From b55724ec4d4a5c16de19404e40aaca29e61cf6b1 Mon Sep 17 00:00:00 2001 From: fidiego Date: Tue, 14 Oct 2025 10:18:19 -0500 Subject: [PATCH 1/4] chore: update cleanup script --- scripts/clean.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/clean.sh b/scripts/clean.sh index 8d5bedc5..1b4a40c3 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1 +1,4 @@ -rm -r version.txt .openapi-generator docs nuon pyproject.toml requirements.txt setup.cfg setup.py test-requirements.txt test tox.ini dist +rm -rf \ + version.txt \ + nuon \ + dist From df786e5ea87c459e5e41045eb8c2bed4035bb072 Mon Sep 17 00:00:00 2001 From: fidiego Date: Tue, 14 Oct 2025 10:18:46 -0500 Subject: [PATCH 2/4] chore: clean --- nuon/__init__.py | 8 - nuon/api/__init__.py | 1 - nuon/api/actions/__init__.py | 1 - .../actions/create_action_workflow_config.py | 193 ----- .../api/actions/create_app_action_workflow.py | 193 ----- .../create_install_action_workflow_run.py | 203 ------ nuon/api/actions/delete_action_workflow.py | 169 ----- nuon/api/actions/get_action_workflow.py | 171 ----- .../api/actions/get_action_workflow_config.py | 171 ----- .../actions/get_action_workflow_configs.py | 245 ------- .../get_action_workflow_latest_config.py | 179 ----- nuon/api/actions/get_action_workflows.py | 260 ------- nuon/api/actions/get_app_action_workflow.py | 184 ----- ...get_install_action_workflow_recent_runs.py | 253 ------- .../get_install_action_workflow_run.py | 184 ----- .../get_install_action_workflow_run_step.py | 205 ------ .../get_install_action_workflow_runs.py | 245 ------- ...et_install_action_workflows_latest_runs.py | 275 ------- .../api/actions/update_app_action_workflow.py | 193 ----- nuon/api/apps/__init__.py | 1 - nuon/api/apps/create_app.py | 180 ----- nuon/api/apps/create_app_branch.py | 193 ----- .../api/apps/create_app_break_glass_config.py | 193 ----- nuon/api/apps/create_app_config.py | 201 ----- nuon/api/apps/create_app_input_config.py | 201 ----- .../api/apps/create_app_permissions_config.py | 193 ----- nuon/api/apps/create_app_policies_config.py | 193 ----- nuon/api/apps/create_app_runner_config.py | 193 ----- nuon/api/apps/create_app_sandbox_config.py | 193 ----- nuon/api/apps/create_app_secret.py | 213 ------ nuon/api/apps/create_app_secrets_config.py | 193 ----- nuon/api/apps/create_app_stack_config.py | 201 ----- nuon/api/apps/delete_app.py | 169 ----- nuon/api/apps/delete_app_secret.py | 190 ----- nuon/api/apps/get_app.py | 179 ----- nuon/api/apps/get_app_branch_app_configs.py | 258 ------- nuon/api/apps/get_app_branches.py | 245 ------- nuon/api/apps/get_app_break_glass_config.py | 192 ----- nuon/api/apps/get_app_config.py | 213 ------ nuon/api/apps/get_app_config_graph.py | 202 ------ nuon/api/apps/get_app_config_template.py | 206 ------ nuon/api/apps/get_app_configs.py | 253 ------- nuon/api/apps/get_app_input_config.py | 192 ----- nuon/api/apps/get_app_input_configs.py | 245 ------- nuon/api/apps/get_app_input_latest_config.py | 171 ----- nuon/api/apps/get_app_latest_config.py | 200 ----- nuon/api/apps/get_app_permissions_config.py | 192 ----- nuon/api/apps/get_app_policies_config.py | 192 ----- nuon/api/apps/get_app_runner_configs.py | 245 ------- nuon/api/apps/get_app_runner_latest_config.py | 171 ----- nuon/api/apps/get_app_sandbox_configs.py | 245 ------- .../api/apps/get_app_sandbox_latest_config.py | 171 ----- nuon/api/apps/get_app_secrets.py | 261 ------- nuon/api/apps/get_app_secrets_config.py | 192 ----- nuon/api/apps/get_app_stack_config.py | 192 ----- nuon/api/apps/get_apps.py | 247 ------- .../apps/get_latest_app_break_glass_config.py | 179 ----- .../apps/get_latest_app_permissions_config.py | 179 ----- .../apps/get_latest_app_policies_config.py | 179 ----- .../api/apps/get_latest_app_secrets_config.py | 179 ----- nuon/api/apps/update_app.py | 193 ----- nuon/api/apps/update_app_config.py | 206 ------ nuon/api/apps/update_app_config_installs.py | 200 ----- nuon/api/components/__init__.py | 1 - nuon/api/components/create_component.py | 193 ----- nuon/api/components/create_component_build.py | 193 ----- .../create_docker_build_component_config.py | 195 ----- .../create_external_image_component_config.py | 195 ----- .../create_helm_component_config.py | 201 ----- .../components/create_job_component_config.py | 193 ----- ...te_kubernetes_manifest_component_config.py | 195 ----- ...reate_terraform_module_component_config.py | 203 ------ nuon/api/components/delete_component.py | 169 ----- nuon/api/components/get_app_component.py | 192 ----- nuon/api/components/get_app_components.py | 275 ------- nuon/api/components/get_build.py | 179 ----- nuon/api/components/get_component.py | 171 ----- nuon/api/components/get_component_build.py | 192 ----- nuon/api/components/get_component_builds.py | 262 ------- nuon/api/components/get_component_config.py | 184 ----- nuon/api/components/get_component_configs.py | 245 ------- .../components/get_component_dependencies.py | 176 ----- .../components/get_component_dependents.py | 171 ----- .../components/get_component_latest_build.py | 171 ----- .../components/get_component_latest_config.py | 171 ----- nuon/api/components/get_org_components.py | 232 ------ nuon/api/components/update_component.py | 193 ----- nuon/api/general/__init__.py | 1 - nuon/api/general/create_waitlist.py | 155 ---- nuon/api/general/get_cli_config.py | 147 ---- .../api/general/get_cloud_platform_regions.py | 184 ----- nuon/api/general/get_config_schema.py | 271 ------- nuon/api/general/get_current_user.py | 147 ---- nuon/api/installers/__init__.py | 1 - nuon/api/installers/create_installer.py | 180 ----- nuon/api/installers/delete_installer.py | 169 ----- nuon/api/installers/get_installer.py | 171 ----- nuon/api/installers/get_installers.py | 240 ------ nuon/api/installers/render_installer.py | 171 ----- nuon/api/installers/update_installer.py | 193 ----- nuon/api/installs/__init__.py | 1 - nuon/api/installs/cancel_install_workflow.py | 169 ----- nuon/api/installs/cancel_workflow.py | 169 ----- nuon/api/installs/create_install.py | 193 ----- nuon/api/installs/create_install_config.py | 193 ----- nuon/api/installs/create_install_deploy.py | 193 ----- nuon/api/installs/create_install_inputs.py | 193 ----- ...install_workflow_step_approval_response.py | 221 ------ .../create_workflow_step_approval_response.py | 221 ------ nuon/api/installs/delete_install.py | 169 ----- .../api/installs/deploy_install_components.py | 211 ------ nuon/api/installs/deprovision_install.py | 199 ----- .../installs/deprovision_install_sandbox.py | 191 ----- nuon/api/installs/forget_install.py | 203 ------ nuon/api/installs/get_app_installs.py | 260 ------- .../installs/get_current_install_inputs.py | 171 ----- nuon/api/installs/get_install.py | 191 ----- .../installs/get_install_action_workflow.py | 192 ----- .../installs/get_install_action_workflows.py | 253 ------- nuon/api/installs/get_install_audit_logs.py | 212 ------ nuon/api/installs/get_install_component.py | 184 ----- .../installs/get_install_component_deploys.py | 258 ------- .../get_install_component_latest_deploy.py | 184 ----- .../installs/get_install_component_outputs.py | 200 ----- nuon/api/installs/get_install_components.py | 230 ------ .../get_install_components_summary.py | 275 ------- nuon/api/installs/get_install_deploy.py | 184 ----- nuon/api/installs/get_install_deploys.py | 245 ------- nuon/api/installs/get_install_event.py | 192 ----- nuon/api/installs/get_install_events.py | 261 ------- nuon/api/installs/get_install_inputs.py | 245 ------- .../api/installs/get_install_latest_deploy.py | 171 ----- nuon/api/installs/get_install_readme.py | 187 ----- nuon/api/installs/get_install_runner_group.py | 179 ----- nuon/api/installs/get_install_sandbox_run.py | 171 ----- nuon/api/installs/get_install_sandbox_runs.py | 245 ------- nuon/api/installs/get_install_stack.py | 171 ----- .../get_install_stack_by_install_id.py | 171 ----- nuon/api/installs/get_install_stack_runs.py | 179 ----- nuon/api/installs/get_install_state.py | 171 ----- nuon/api/installs/get_install_workflow.py | 179 ----- .../api/installs/get_install_workflow_step.py | 192 ----- .../get_install_workflow_step_approval.py | 197 ----- .../installs/get_install_workflow_steps.py | 184 ----- nuon/api/installs/get_org_installs.py | 247 ------- nuon/api/installs/get_workflow.py | 179 ----- nuon/api/installs/get_workflow_step.py | 192 ----- .../installs/get_workflow_step_approval.py | 197 ----- .../get_workflow_step_approval_contents.py | 204 ------ nuon/api/installs/get_workflow_steps.py | 184 ----- nuon/api/installs/get_workflows.py | 253 ------- nuon/api/installs/phone_home.py | 216 ------ nuon/api/installs/reprovision_install.py | 203 ------ .../installs/reprovision_install_sandbox.py | 199 ----- .../installs/retry_owner_workflow_by_id.py | 193 ----- nuon/api/installs/retry_workflow.py | 193 ----- nuon/api/installs/sync_secrets.py | 199 ----- .../installs/teardown_install_component.py | 204 ------ .../installs/teardown_install_components.py | 199 ----- nuon/api/installs/update_install.py | 193 ----- nuon/api/installs/update_install_config.py | 206 ------ nuon/api/installs/update_install_inputs.py | 193 ----- nuon/api/installs/update_install_workflow.py | 193 ----- nuon/api/installs/update_workflow.py | 193 ----- nuon/api/orgs/__init__.py | 1 - nuon/api/orgs/add_user.py | 180 ----- nuon/api/orgs/create_org.py | 180 ----- nuon/api/orgs/create_org_invite.py | 200 ----- nuon/api/orgs/delete_org.py | 145 ---- nuon/api/orgs/get_org.py | 147 ---- nuon/api/orgs/get_org_acounts.py | 227 ------ nuon/api/orgs/get_org_invites.py | 240 ------ nuon/api/orgs/get_org_runner_group.py | 155 ---- nuon/api/orgs/get_orgs.py | 232 ------ nuon/api/orgs/remove_user.py | 188 ----- nuon/api/orgs/update_org.py | 180 ----- nuon/api/releases/__init__.py | 1 - nuon/api/releases/create_component_release.py | 193 ----- nuon/api/releases/get_app_releases.py | 245 ------- nuon/api/releases/get_component_releases.py | 245 ------- nuon/api/releases/get_release.py | 171 ----- nuon/api/releases/get_release_steps.py | 245 ------- nuon/api/runners/__init__.py | 1 - nuon/api/runners/cancel_runner_job.py | 201 ----- .../api/runners/create_terraform_workspace.py | 180 ----- .../api/runners/delete_terraform_workspace.py | 176 ----- nuon/api/runners/force_shut_down_runner.py | 207 ------ nuon/api/runners/get_log_stream.py | 179 ----- nuon/api/runners/get_runner_connect_status.py | 203 ------ nuon/api/runners/get_runner_job.py | 179 ----- nuon/api/runners/get_runner_job_plan.py | 177 ----- nuon/api/runners/get_runner_jobs.py | 313 -------- .../runners/get_runner_latest_heart_beat.py | 179 ----- .../get_runner_recent_health_checks.py | 268 ------- nuon/api/runners/get_runner_settings.py | 179 ----- .../get_terraform_current_state_data.py | 147 ---- nuon/api/runners/get_terraform_states.py | 245 ------- nuon/api/runners/get_terraform_workspace.py | 176 ----- .../runners/get_terraform_workspace_lock.py | 171 ----- .../get_terraform_workspace_state_by_id.py | 184 ----- ...erraform_workspace_state_json_resources.py | 186 ----- ...get_terraform_workspace_state_resources.py | 189 ----- .../get_terraform_workspace_states_json.py | 245 ------- ...t_terraform_workspace_states_json_by_id.py | 186 ----- nuon/api/runners/get_terraform_workspaces.py | 152 ---- nuon/api/runners/graceful_shut_down_runner.py | 211 ------ nuon/api/runners/lock_terraform_workspace.py | 213 ------ nuon/api/runners/log_stream_read_logs.py | 202 ------ nuon/api/runners/mng_vm_shut_down.py | 191 ----- nuon/api/runners/shut_down_runner_mng.py | 191 ----- .../api/runners/unlock_terraform_workspace.py | 193 ----- nuon/api/runners/update_runner_mng.py | 191 ----- nuon/api/runners/update_runner_settings.py | 193 ----- nuon/api/runners/update_terraform_state.py | 180 ----- nuon/api/runnersrunner/__init__.py | 1 - nuon/api/runnersrunner/get_runner.py | 179 ----- .../get_runner_job_executions.py | 253 ------- nuon/api/vcs/__init__.py | 1 - nuon/api/vcs/create_vcs_connection.py | 180 ----- .../api/vcs/create_vcs_connection_callback.py | 180 ----- nuon/api/vcs/get_org_vcs_connections.py | 232 ------ nuon/api/vcs/get_vcs_connection.py | 171 ----- nuon/client.py | 268 ------- nuon/errors.py | 16 - nuon/models/__init__.py | 685 ------------------ nuon/models/app_account.py | 166 ----- nuon/models/app_account_type.py | 11 - nuon/models/app_action_workflow.py | 156 ---- nuon/models/app_action_workflow_config.py | 212 ------ .../models/app_action_workflow_step_config.py | 227 ------ ...pp_action_workflow_step_config_env_vars.py | 44 -- .../app_action_workflow_trigger_config.py | 162 ----- .../app_action_workflow_trigger_type.py | 31 - nuon/models/app_app.py | 270 ------- nuon/models/app_app_awsiam_policy_config.py | 149 ---- nuon/models/app_app_awsiam_role_config.py | 218 ------ nuon/models/app_app_branch.py | 147 ---- nuon/models/app_app_break_glass_config.py | 138 ---- nuon/models/app_app_config.py | 423 ----------- nuon/models/app_app_config_status.py | 12 - nuon/models/app_app_config_version.py | 9 - nuon/models/app_app_input.py | 216 ------ nuon/models/app_app_input_config.py | 180 ----- nuon/models/app_app_input_group.py | 165 ----- nuon/models/app_app_links.py | 44 -- nuon/models/app_app_permissions_config.py | 186 ----- nuon/models/app_app_policies_config.py | 113 --- nuon/models/app_app_runner_config.py | 188 ----- nuon/models/app_app_runner_config_env_vars.py | 44 -- .../app_app_runner_config_helm_driver_type.py | 10 - nuon/models/app_app_runner_type.py | 15 - nuon/models/app_app_sandbox_config.py | 227 ------ .../models/app_app_sandbox_config_env_vars.py | 44 -- .../app_app_sandbox_config_variables.py | 44 -- nuon/models/app_app_secret.py | 122 ---- nuon/models/app_app_secret_config.py | 230 ------ nuon/models/app_app_secrets_config.py | 138 ---- nuon/models/app_app_stack_config.py | 166 ----- nuon/models/app_aws_account.py | 104 --- nuon/models/app_aws_stack_outputs.py | 144 ---- nuon/models/app_awsecr_image_config.py | 122 ---- nuon/models/app_awsiam_role_type.py | 12 - nuon/models/app_azure_account.py | 131 ---- nuon/models/app_azure_stack_outputs.py | 175 ----- nuon/models/app_cloud_platform.py | 10 - nuon/models/app_cloud_platform_region.py | 86 --- nuon/models/app_component.py | 199 ----- nuon/models/app_component_build.py | 313 -------- nuon/models/app_component_build_status.py | 12 - .../models/app_component_config_connection.py | 312 -------- nuon/models/app_component_links.py | 44 -- nuon/models/app_component_release.py | 147 ---- nuon/models/app_component_release_step.py | 161 ---- nuon/models/app_component_type.py | 14 - nuon/models/app_composite_status.py | 135 ---- nuon/models/app_composite_status_metadata.py | 44 -- .../models/app_connected_github_vcs_config.py | 180 ----- .../app_docker_build_component_config.py | 182 ----- ..._docker_build_component_config_env_vars.py | 44 -- .../app_external_image_component_config.py | 135 ---- nuon/models/app_helm_chart.py | 138 ---- nuon/models/app_helm_component_config.py | 218 ------ .../app_helm_component_config_values.py | 44 -- nuon/models/app_helm_config.py | 119 --- nuon/models/app_helm_config_values.py | 44 -- nuon/models/app_helm_release.py | 211 ------ nuon/models/app_install.py | 534 -------------- nuon/models/app_install_action_workflow.py | 156 ---- .../models/app_install_action_workflow_run.py | 380 ---------- ...app_install_action_workflow_run_outputs.py | 44 -- ...nstall_action_workflow_run_run_env_vars.py | 44 -- .../app_install_action_workflow_run_step.py | 130 ---- ...install_action_workflow_run_step_status.py | 12 - nuon/models/app_install_approval_option.py | 9 - nuon/models/app_install_audit_log.py | 86 --- nuon/models/app_install_component.py | 237 ------ nuon/models/app_install_component_links.py | 44 -- nuon/models/app_install_component_statuses.py | 44 -- nuon/models/app_install_component_summary.py | 172 ----- nuon/models/app_install_config.py | 121 ---- nuon/models/app_install_deploy.py | 374 ---------- nuon/models/app_install_deploy_outputs.py | 44 -- nuon/models/app_install_deploy_status.py | 20 - nuon/models/app_install_deploy_type.py | 10 - nuon/models/app_install_event.py | 161 ---- nuon/models/app_install_event_payload.py | 44 -- nuon/models/app_install_inputs.py | 153 ---- .../app_install_inputs_redacted_values.py | 44 -- nuon/models/app_install_inputs_values.py | 44 -- nuon/models/app_install_links.py | 44 -- nuon/models/app_install_sandbox.py | 174 ----- nuon/models/app_install_sandbox_run.py | 311 -------- .../models/app_install_sandbox_run_outputs.py | 44 -- nuon/models/app_install_stack.py | 147 ---- nuon/models/app_install_stack_outputs.py | 171 ----- nuon/models/app_install_stack_outputs_data.py | 44 -- nuon/models/app_install_stack_version.py | 237 ------ nuon/models/app_install_stack_version_run.py | 108 --- .../app_install_stack_version_run_data.py | 44 -- nuon/models/app_install_state.py | 140 ---- nuon/models/app_installer.py | 155 ---- nuon/models/app_installer_metadata.py | 221 ------ nuon/models/app_installer_type.py | 8 - nuon/models/app_job_component_config.py | 157 ---- .../app_job_component_config_env_vars.py | 44 -- nuon/models/app_json_map.py | 44 -- ...pp_kubernetes_manifest_component_config.py | 113 --- nuon/models/app_log_stream.py | 162 ----- nuon/models/app_log_stream_attrs.py | 44 -- nuon/models/app_notifications_config.py | 122 ---- nuon/models/app_oci_artifact.py | 247 ------- nuon/models/app_oci_artifact_annotations.py | 44 -- nuon/models/app_operation_status.py | 11 - nuon/models/app_org.py | 228 ------ nuon/models/app_org_invite.py | 138 ---- nuon/models/app_org_invite_status.py | 9 - nuon/models/app_org_links.py | 44 -- nuon/models/app_otel_log_record.py | 333 --------- .../app_otel_log_record_log_attributes.py | 44 -- ...app_otel_log_record_resource_attributes.py | 44 -- .../app_otel_log_record_scope_attributes.py | 44 -- nuon/models/app_policy.py | 135 ---- nuon/models/app_policy_name.py | 11 - nuon/models/app_policy_permissions.py | 44 -- nuon/models/app_public_git_vcs_config.py | 131 ---- nuon/models/app_role.py | 146 ---- nuon/models/app_role_type.py | 11 - nuon/models/app_runner.py | 202 ------ nuon/models/app_runner_group.py | 190 ----- nuon/models/app_runner_group_settings.py | 309 -------- .../app_runner_group_settings_aws_tags.py | 44 -- .../app_runner_group_settings_metadata.py | 44 -- nuon/models/app_runner_group_type.py | 9 - nuon/models/app_runner_health_check.py | 152 ---- nuon/models/app_runner_heart_beat.py | 122 ---- nuon/models/app_runner_job.py | 370 ---------- nuon/models/app_runner_job_execution.py | 161 ---- .../app_runner_job_execution_outputs.py | 135 ---- ...pp_runner_job_execution_outputs_outputs.py | 63 -- ...ion_outputs_outputs_additional_property.py | 44 -- .../models/app_runner_job_execution_result.py | 180 ----- ...ner_job_execution_result_error_metadata.py | 44 -- .../models/app_runner_job_execution_status.py | 17 - nuon/models/app_runner_job_group.py | 18 - nuon/models/app_runner_job_metadata.py | 44 -- nuon/models/app_runner_job_operation_type.py | 13 - nuon/models/app_runner_job_outputs.py | 44 -- nuon/models/app_runner_job_status.py | 16 - nuon/models/app_runner_job_type.py | 34 - nuon/models/app_runner_operation.py | 152 ---- nuon/models/app_runner_operation_type.py | 11 - nuon/models/app_runner_status.py | 17 - nuon/models/app_sandbox_run_type.py | 10 - nuon/models/app_stack_type.py | 8 - nuon/models/app_status.py | 30 - nuon/models/app_step_error_behavior.py | 9 - nuon/models/app_terraform_lock.py | 113 --- .../app_terraform_module_component_config.py | 191 ----- ...raform_module_component_config_env_vars.py | 44 -- ...aform_module_component_config_variables.py | 44 -- nuon/models/app_terraform_state_instance.py | 92 --- ...app_terraform_state_instance_attributes.py | 44 -- nuon/models/app_terraform_state_resource.py | 111 --- nuon/models/app_terraform_workspace.py | 113 --- nuon/models/app_terraform_workspace_lock.py | 145 ---- nuon/models/app_terraform_workspace_state.py | 173 ----- .../app_terraform_workspace_state_json.py | 138 ---- nuon/models/app_vcs_connection.py | 120 --- nuon/models/app_vcs_connection_commit.py | 131 ---- nuon/models/app_waitlist.py | 95 --- nuon/models/app_workflow.py | 371 ---------- nuon/models/app_workflow_links.py | 44 -- nuon/models/app_workflow_metadata.py | 44 -- nuon/models/app_workflow_step.py | 378 ---------- nuon/models/app_workflow_step_approval.py | 222 ------ .../app_workflow_step_approval_response.py | 121 ---- .../models/app_workflow_step_approval_type.py | 12 - .../app_workflow_step_execution_type.py | 12 - nuon/models/app_workflow_step_links.py | 44 -- nuon/models/app_workflow_step_metadata.py | 44 -- .../app_workflow_step_policy_validation.py | 136 ---- .../models/app_workflow_step_response_type.py | 12 - nuon/models/app_workflow_type.py | 22 - nuon/models/config_app_policy_type.py | 11 - nuon/models/get_app_config_template_type.py | 25 - nuon/models/get_config_schema_response_200.py | 44 -- ..._install_component_outputs_response_200.py | 44 -- ...space_state_json_resources_response_200.py | 44 -- ...orkspace_states_json_by_id_response_200.py | 44 -- ...owertoolsdev_mono_pkg_types_state_state.py | 292 -------- ...v_mono_pkg_types_state_state_components.py | 44 -- .../helpers_create_install_config_params.py | 67 -- nuon/models/lock_terraform_workspace_body.py | 44 -- nuon/models/outputs_secret_sync_output.py | 122 ---- nuon/models/permissions_permission.py | 13 - nuon/models/permissions_set.py | 53 -- nuon/models/refs_ref.py | 94 --- nuon/models/refs_ref_type.py | 14 - .../service_app_awsiam_policy_config.py | 77 -- nuon/models/service_app_awsiam_role_config.py | 111 --- nuon/models/service_app_config_template.py | 102 --- .../service_app_config_template_type.py | 25 - nuon/models/service_app_group_request.py | 75 -- nuon/models/service_app_input_request.py | 130 ---- nuon/models/service_app_policy_config.py | 69 -- nuon/models/service_app_secret_config.py | 140 ---- .../service_aws_ecr_image_config_request.py | 68 -- .../service_cancel_runner_job_request.py | 44 -- nuon/models/service_cli_config.py | 86 --- nuon/models/service_component_children.py | 75 -- ...thub_vcs_action_workflow_config_request.py | 87 --- ...ice_connected_github_vcs_config_request.py | 87 --- ...ected_github_vcs_sandbox_config_request.py | 87 --- ...e_create_action_workflow_config_request.py | 138 ---- ...ate_action_workflow_config_step_request.py | 162 ----- ...n_workflow_config_step_request_env_vars.py | 44 -- ..._action_workflow_config_trigger_request.py | 80 -- ...vice_create_app_action_workflow_request.py | 59 -- .../service_create_app_branch_request.py | 67 -- ...e_create_app_break_glass_config_request.py | 81 --- .../service_create_app_config_request.py | 68 -- ...service_create_app_input_config_request.py | 86 --- ..._create_app_input_config_request_groups.py | 57 -- ..._create_app_input_config_request_inputs.py | 57 -- ...e_create_app_permissions_config_request.py | 89 --- ...vice_create_app_policies_config_request.py | 86 --- nuon/models/service_create_app_request.py | 88 --- ...ervice_create_app_runner_config_request.py | 121 ---- ...eate_app_runner_config_request_env_vars.py | 44 -- ...rvice_create_app_sandbox_config_request.py | 153 ---- ...ate_app_sandbox_config_request_env_vars.py | 44 -- ...te_app_sandbox_config_request_variables.py | 44 -- .../service_create_app_secret_request.py | 67 -- ...rvice_create_app_secrets_config_request.py | 86 --- ...service_create_app_stack_config_request.py | 104 --- .../service_create_component_build_request.py | 68 -- ...ervice_create_component_release_request.py | 103 --- ...eate_component_release_request_strategy.py | 68 -- .../service_create_component_request.py | 81 --- ...vice_create_connection_callback_request.py | 67 -- .../service_create_connection_request.py | 59 -- ...e_docker_build_component_config_request.py | 183 ----- ...build_component_config_request_env_vars.py | 44 -- ...external_image_component_config_request.py | 131 ---- ...ce_create_helm_component_config_request.py | 193 ----- ...te_helm_component_config_request_values.py | 44 -- ...ate_install_action_workflow_run_request.py | 85 --- ...ction_workflow_run_request_run_env_vars.py | 44 -- .../service_create_install_config_request.py | 67 -- .../service_create_install_deploy_request.py | 77 -- .../service_create_install_inputs_request.py | 65 -- ...ce_create_install_inputs_request_inputs.py | 44 -- nuon/models/service_create_install_request.py | 137 ---- ...vice_create_install_request_aws_account.py | 68 -- ...ce_create_install_request_azure_account.py | 95 --- .../service_create_install_request_inputs.py | 44 -- .../service_create_installer_request.py | 91 --- ...rvice_create_installer_request_metadata.py | 154 ---- ...ice_create_job_component_config_request.py | 146 ---- ...e_job_component_config_request_env_vars.py | 44 -- ...netes_manifest_component_config_request.py | 108 --- .../service_create_org_invite_request.py | 59 -- nuon/models/service_create_org_request.py | 70 -- .../models/service_create_org_user_request.py | 59 -- ...rraform_module_component_config_request.py | 181 ----- ...odule_component_config_request_env_vars.py | 44 -- ...dule_component_config_request_variables.py | 44 -- ...vice_create_terraform_workspace_request.py | 67 -- ...workflow_step_approval_response_request.py | 76 -- ...rvice_deploy_install_components_request.py | 59 -- .../service_deprovision_install_request.py | 68 -- ...ice_deprovision_install_sandbox_request.py | 68 -- nuon/models/service_force_shutdown_request.py | 44 -- nuon/models/service_forget_install_request.py | 44 -- .../service_graceful_shutdown_request.py | 44 -- .../service_install_phone_home_request.py | 44 -- nuon/models/service_mng_shut_down_request.py | 44 -- nuon/models/service_mng_update_request.py | 44 -- .../service_mng_vm_shut_down_request.py | 44 -- ..._git_vcs_action_workflow_config_request.py | 75 -- .../service_public_git_vcs_config_request.py | 75 -- ...e_public_git_vcs_sandbox_config_request.py | 75 -- nuon/models/service_readme.py | 79 -- .../models/service_remove_org_user_request.py | 59 -- nuon/models/service_rendered_installer.py | 102 --- .../service_reprovision_install_request.py | 59 -- ...ice_reprovision_install_sandbox_request.py | 59 -- .../service_retry_workflow_by_id_request.py | 68 -- .../service_retry_workflow_by_id_response.py | 59 -- nuon/models/service_retry_workflow_request.py | 77 -- .../models/service_retry_workflow_response.py | 59 -- .../service_runner_connection_status.py | 68 -- nuon/models/service_sync_secrets_request.py | 59 -- ...vice_teardown_install_component_request.py | 68 -- ...ice_teardown_install_components_request.py | 68 -- .../service_update_action_workflow_request.py | 59 -- ...vice_update_app_config_installs_request.py | 70 -- .../service_update_app_config_request.py | 96 --- nuon/models/service_update_app_request.py | 104 --- .../service_update_component_request.py | 81 --- .../service_update_install_config_request.py | 67 -- .../service_update_install_inputs_request.py | 65 -- ...ce_update_install_inputs_request_inputs.py | 44 -- nuon/models/service_update_install_request.py | 59 -- .../service_update_installer_request.py | 91 --- ...rvice_update_installer_request_metadata.py | 154 ---- nuon/models/service_update_org_request.py | 59 -- .../service_update_runner_settings_request.py | 104 --- .../models/service_update_workflow_request.py | 61 -- nuon/models/service_waitlist_request.py | 59 -- nuon/models/state_action_workflow_state.py | 99 --- .../state_action_workflow_state_outputs.py | 44 -- nuon/models/state_actions_state.py | 81 --- nuon/models/state_actions_state_workflows.py | 57 -- nuon/models/state_app_state.py | 108 --- nuon/models/state_app_state_secrets.py | 44 -- nuon/models/state_aws_cloud_account.py | 59 -- nuon/models/state_azure_cloud_account.py | 59 -- nuon/models/state_cloud_account.py | 90 --- nuon/models/state_domain_state.py | 77 -- nuon/models/state_inputs_state.py | 81 --- nuon/models/state_inputs_state_inputs.py | 44 -- nuon/models/state_install_stack_state.py | 126 ---- .../state_install_stack_state_outputs.py | 44 -- nuon/models/state_install_state.py | 135 ---- nuon/models/state_install_state_inputs.py | 44 -- nuon/models/state_org_state.py | 86 --- nuon/models/state_runner_state.py | 86 --- nuon/models/state_sandbox_state.py | 127 ---- nuon/models/state_sandbox_state_outputs.py | 44 -- nuon/models/state_secrets_state.py | 57 -- nuon/models/stderr_err_response.py | 77 -- nuon/models/types_string_bool_map.py | 44 -- .../models/unlock_terraform_workspace_body.py | 44 -- nuon/models/update_terraform_state_body.py | 44 -- nuon/py.typed | 1 - nuon/types.py | 54 -- version.txt | 1 - 558 files changed, 74925 deletions(-) delete mode 100644 nuon/__init__.py delete mode 100644 nuon/api/__init__.py delete mode 100644 nuon/api/actions/__init__.py delete mode 100644 nuon/api/actions/create_action_workflow_config.py delete mode 100644 nuon/api/actions/create_app_action_workflow.py delete mode 100644 nuon/api/actions/create_install_action_workflow_run.py delete mode 100644 nuon/api/actions/delete_action_workflow.py delete mode 100644 nuon/api/actions/get_action_workflow.py delete mode 100644 nuon/api/actions/get_action_workflow_config.py delete mode 100644 nuon/api/actions/get_action_workflow_configs.py delete mode 100644 nuon/api/actions/get_action_workflow_latest_config.py delete mode 100644 nuon/api/actions/get_action_workflows.py delete mode 100644 nuon/api/actions/get_app_action_workflow.py delete mode 100644 nuon/api/actions/get_install_action_workflow_recent_runs.py delete mode 100644 nuon/api/actions/get_install_action_workflow_run.py delete mode 100644 nuon/api/actions/get_install_action_workflow_run_step.py delete mode 100644 nuon/api/actions/get_install_action_workflow_runs.py delete mode 100644 nuon/api/actions/get_install_action_workflows_latest_runs.py delete mode 100644 nuon/api/actions/update_app_action_workflow.py delete mode 100644 nuon/api/apps/__init__.py delete mode 100644 nuon/api/apps/create_app.py delete mode 100644 nuon/api/apps/create_app_branch.py delete mode 100644 nuon/api/apps/create_app_break_glass_config.py delete mode 100644 nuon/api/apps/create_app_config.py delete mode 100644 nuon/api/apps/create_app_input_config.py delete mode 100644 nuon/api/apps/create_app_permissions_config.py delete mode 100644 nuon/api/apps/create_app_policies_config.py delete mode 100644 nuon/api/apps/create_app_runner_config.py delete mode 100644 nuon/api/apps/create_app_sandbox_config.py delete mode 100644 nuon/api/apps/create_app_secret.py delete mode 100644 nuon/api/apps/create_app_secrets_config.py delete mode 100644 nuon/api/apps/create_app_stack_config.py delete mode 100644 nuon/api/apps/delete_app.py delete mode 100644 nuon/api/apps/delete_app_secret.py delete mode 100644 nuon/api/apps/get_app.py delete mode 100644 nuon/api/apps/get_app_branch_app_configs.py delete mode 100644 nuon/api/apps/get_app_branches.py delete mode 100644 nuon/api/apps/get_app_break_glass_config.py delete mode 100644 nuon/api/apps/get_app_config.py delete mode 100644 nuon/api/apps/get_app_config_graph.py delete mode 100644 nuon/api/apps/get_app_config_template.py delete mode 100644 nuon/api/apps/get_app_configs.py delete mode 100644 nuon/api/apps/get_app_input_config.py delete mode 100644 nuon/api/apps/get_app_input_configs.py delete mode 100644 nuon/api/apps/get_app_input_latest_config.py delete mode 100644 nuon/api/apps/get_app_latest_config.py delete mode 100644 nuon/api/apps/get_app_permissions_config.py delete mode 100644 nuon/api/apps/get_app_policies_config.py delete mode 100644 nuon/api/apps/get_app_runner_configs.py delete mode 100644 nuon/api/apps/get_app_runner_latest_config.py delete mode 100644 nuon/api/apps/get_app_sandbox_configs.py delete mode 100644 nuon/api/apps/get_app_sandbox_latest_config.py delete mode 100644 nuon/api/apps/get_app_secrets.py delete mode 100644 nuon/api/apps/get_app_secrets_config.py delete mode 100644 nuon/api/apps/get_app_stack_config.py delete mode 100644 nuon/api/apps/get_apps.py delete mode 100644 nuon/api/apps/get_latest_app_break_glass_config.py delete mode 100644 nuon/api/apps/get_latest_app_permissions_config.py delete mode 100644 nuon/api/apps/get_latest_app_policies_config.py delete mode 100644 nuon/api/apps/get_latest_app_secrets_config.py delete mode 100644 nuon/api/apps/update_app.py delete mode 100644 nuon/api/apps/update_app_config.py delete mode 100644 nuon/api/apps/update_app_config_installs.py delete mode 100644 nuon/api/components/__init__.py delete mode 100644 nuon/api/components/create_component.py delete mode 100644 nuon/api/components/create_component_build.py delete mode 100644 nuon/api/components/create_docker_build_component_config.py delete mode 100644 nuon/api/components/create_external_image_component_config.py delete mode 100644 nuon/api/components/create_helm_component_config.py delete mode 100644 nuon/api/components/create_job_component_config.py delete mode 100644 nuon/api/components/create_kubernetes_manifest_component_config.py delete mode 100644 nuon/api/components/create_terraform_module_component_config.py delete mode 100644 nuon/api/components/delete_component.py delete mode 100644 nuon/api/components/get_app_component.py delete mode 100644 nuon/api/components/get_app_components.py delete mode 100644 nuon/api/components/get_build.py delete mode 100644 nuon/api/components/get_component.py delete mode 100644 nuon/api/components/get_component_build.py delete mode 100644 nuon/api/components/get_component_builds.py delete mode 100644 nuon/api/components/get_component_config.py delete mode 100644 nuon/api/components/get_component_configs.py delete mode 100644 nuon/api/components/get_component_dependencies.py delete mode 100644 nuon/api/components/get_component_dependents.py delete mode 100644 nuon/api/components/get_component_latest_build.py delete mode 100644 nuon/api/components/get_component_latest_config.py delete mode 100644 nuon/api/components/get_org_components.py delete mode 100644 nuon/api/components/update_component.py delete mode 100644 nuon/api/general/__init__.py delete mode 100644 nuon/api/general/create_waitlist.py delete mode 100644 nuon/api/general/get_cli_config.py delete mode 100644 nuon/api/general/get_cloud_platform_regions.py delete mode 100644 nuon/api/general/get_config_schema.py delete mode 100644 nuon/api/general/get_current_user.py delete mode 100644 nuon/api/installers/__init__.py delete mode 100644 nuon/api/installers/create_installer.py delete mode 100644 nuon/api/installers/delete_installer.py delete mode 100644 nuon/api/installers/get_installer.py delete mode 100644 nuon/api/installers/get_installers.py delete mode 100644 nuon/api/installers/render_installer.py delete mode 100644 nuon/api/installers/update_installer.py delete mode 100644 nuon/api/installs/__init__.py delete mode 100644 nuon/api/installs/cancel_install_workflow.py delete mode 100644 nuon/api/installs/cancel_workflow.py delete mode 100644 nuon/api/installs/create_install.py delete mode 100644 nuon/api/installs/create_install_config.py delete mode 100644 nuon/api/installs/create_install_deploy.py delete mode 100644 nuon/api/installs/create_install_inputs.py delete mode 100644 nuon/api/installs/create_install_workflow_step_approval_response.py delete mode 100644 nuon/api/installs/create_workflow_step_approval_response.py delete mode 100644 nuon/api/installs/delete_install.py delete mode 100644 nuon/api/installs/deploy_install_components.py delete mode 100644 nuon/api/installs/deprovision_install.py delete mode 100644 nuon/api/installs/deprovision_install_sandbox.py delete mode 100644 nuon/api/installs/forget_install.py delete mode 100644 nuon/api/installs/get_app_installs.py delete mode 100644 nuon/api/installs/get_current_install_inputs.py delete mode 100644 nuon/api/installs/get_install.py delete mode 100644 nuon/api/installs/get_install_action_workflow.py delete mode 100644 nuon/api/installs/get_install_action_workflows.py delete mode 100644 nuon/api/installs/get_install_audit_logs.py delete mode 100644 nuon/api/installs/get_install_component.py delete mode 100644 nuon/api/installs/get_install_component_deploys.py delete mode 100644 nuon/api/installs/get_install_component_latest_deploy.py delete mode 100644 nuon/api/installs/get_install_component_outputs.py delete mode 100644 nuon/api/installs/get_install_components.py delete mode 100644 nuon/api/installs/get_install_components_summary.py delete mode 100644 nuon/api/installs/get_install_deploy.py delete mode 100644 nuon/api/installs/get_install_deploys.py delete mode 100644 nuon/api/installs/get_install_event.py delete mode 100644 nuon/api/installs/get_install_events.py delete mode 100644 nuon/api/installs/get_install_inputs.py delete mode 100644 nuon/api/installs/get_install_latest_deploy.py delete mode 100644 nuon/api/installs/get_install_readme.py delete mode 100644 nuon/api/installs/get_install_runner_group.py delete mode 100644 nuon/api/installs/get_install_sandbox_run.py delete mode 100644 nuon/api/installs/get_install_sandbox_runs.py delete mode 100644 nuon/api/installs/get_install_stack.py delete mode 100644 nuon/api/installs/get_install_stack_by_install_id.py delete mode 100644 nuon/api/installs/get_install_stack_runs.py delete mode 100644 nuon/api/installs/get_install_state.py delete mode 100644 nuon/api/installs/get_install_workflow.py delete mode 100644 nuon/api/installs/get_install_workflow_step.py delete mode 100644 nuon/api/installs/get_install_workflow_step_approval.py delete mode 100644 nuon/api/installs/get_install_workflow_steps.py delete mode 100644 nuon/api/installs/get_org_installs.py delete mode 100644 nuon/api/installs/get_workflow.py delete mode 100644 nuon/api/installs/get_workflow_step.py delete mode 100644 nuon/api/installs/get_workflow_step_approval.py delete mode 100644 nuon/api/installs/get_workflow_step_approval_contents.py delete mode 100644 nuon/api/installs/get_workflow_steps.py delete mode 100644 nuon/api/installs/get_workflows.py delete mode 100644 nuon/api/installs/phone_home.py delete mode 100644 nuon/api/installs/reprovision_install.py delete mode 100644 nuon/api/installs/reprovision_install_sandbox.py delete mode 100644 nuon/api/installs/retry_owner_workflow_by_id.py delete mode 100644 nuon/api/installs/retry_workflow.py delete mode 100644 nuon/api/installs/sync_secrets.py delete mode 100644 nuon/api/installs/teardown_install_component.py delete mode 100644 nuon/api/installs/teardown_install_components.py delete mode 100644 nuon/api/installs/update_install.py delete mode 100644 nuon/api/installs/update_install_config.py delete mode 100644 nuon/api/installs/update_install_inputs.py delete mode 100644 nuon/api/installs/update_install_workflow.py delete mode 100644 nuon/api/installs/update_workflow.py delete mode 100644 nuon/api/orgs/__init__.py delete mode 100644 nuon/api/orgs/add_user.py delete mode 100644 nuon/api/orgs/create_org.py delete mode 100644 nuon/api/orgs/create_org_invite.py delete mode 100644 nuon/api/orgs/delete_org.py delete mode 100644 nuon/api/orgs/get_org.py delete mode 100644 nuon/api/orgs/get_org_acounts.py delete mode 100644 nuon/api/orgs/get_org_invites.py delete mode 100644 nuon/api/orgs/get_org_runner_group.py delete mode 100644 nuon/api/orgs/get_orgs.py delete mode 100644 nuon/api/orgs/remove_user.py delete mode 100644 nuon/api/orgs/update_org.py delete mode 100644 nuon/api/releases/__init__.py delete mode 100644 nuon/api/releases/create_component_release.py delete mode 100644 nuon/api/releases/get_app_releases.py delete mode 100644 nuon/api/releases/get_component_releases.py delete mode 100644 nuon/api/releases/get_release.py delete mode 100644 nuon/api/releases/get_release_steps.py delete mode 100644 nuon/api/runners/__init__.py delete mode 100644 nuon/api/runners/cancel_runner_job.py delete mode 100644 nuon/api/runners/create_terraform_workspace.py delete mode 100644 nuon/api/runners/delete_terraform_workspace.py delete mode 100644 nuon/api/runners/force_shut_down_runner.py delete mode 100644 nuon/api/runners/get_log_stream.py delete mode 100644 nuon/api/runners/get_runner_connect_status.py delete mode 100644 nuon/api/runners/get_runner_job.py delete mode 100644 nuon/api/runners/get_runner_job_plan.py delete mode 100644 nuon/api/runners/get_runner_jobs.py delete mode 100644 nuon/api/runners/get_runner_latest_heart_beat.py delete mode 100644 nuon/api/runners/get_runner_recent_health_checks.py delete mode 100644 nuon/api/runners/get_runner_settings.py delete mode 100644 nuon/api/runners/get_terraform_current_state_data.py delete mode 100644 nuon/api/runners/get_terraform_states.py delete mode 100644 nuon/api/runners/get_terraform_workspace.py delete mode 100644 nuon/api/runners/get_terraform_workspace_lock.py delete mode 100644 nuon/api/runners/get_terraform_workspace_state_by_id.py delete mode 100644 nuon/api/runners/get_terraform_workspace_state_json_resources.py delete mode 100644 nuon/api/runners/get_terraform_workspace_state_resources.py delete mode 100644 nuon/api/runners/get_terraform_workspace_states_json.py delete mode 100644 nuon/api/runners/get_terraform_workspace_states_json_by_id.py delete mode 100644 nuon/api/runners/get_terraform_workspaces.py delete mode 100644 nuon/api/runners/graceful_shut_down_runner.py delete mode 100644 nuon/api/runners/lock_terraform_workspace.py delete mode 100644 nuon/api/runners/log_stream_read_logs.py delete mode 100644 nuon/api/runners/mng_vm_shut_down.py delete mode 100644 nuon/api/runners/shut_down_runner_mng.py delete mode 100644 nuon/api/runners/unlock_terraform_workspace.py delete mode 100644 nuon/api/runners/update_runner_mng.py delete mode 100644 nuon/api/runners/update_runner_settings.py delete mode 100644 nuon/api/runners/update_terraform_state.py delete mode 100644 nuon/api/runnersrunner/__init__.py delete mode 100644 nuon/api/runnersrunner/get_runner.py delete mode 100644 nuon/api/runnersrunner/get_runner_job_executions.py delete mode 100644 nuon/api/vcs/__init__.py delete mode 100644 nuon/api/vcs/create_vcs_connection.py delete mode 100644 nuon/api/vcs/create_vcs_connection_callback.py delete mode 100644 nuon/api/vcs/get_org_vcs_connections.py delete mode 100644 nuon/api/vcs/get_vcs_connection.py delete mode 100644 nuon/client.py delete mode 100644 nuon/errors.py delete mode 100644 nuon/models/__init__.py delete mode 100644 nuon/models/app_account.py delete mode 100644 nuon/models/app_account_type.py delete mode 100644 nuon/models/app_action_workflow.py delete mode 100644 nuon/models/app_action_workflow_config.py delete mode 100644 nuon/models/app_action_workflow_step_config.py delete mode 100644 nuon/models/app_action_workflow_step_config_env_vars.py delete mode 100644 nuon/models/app_action_workflow_trigger_config.py delete mode 100644 nuon/models/app_action_workflow_trigger_type.py delete mode 100644 nuon/models/app_app.py delete mode 100644 nuon/models/app_app_awsiam_policy_config.py delete mode 100644 nuon/models/app_app_awsiam_role_config.py delete mode 100644 nuon/models/app_app_branch.py delete mode 100644 nuon/models/app_app_break_glass_config.py delete mode 100644 nuon/models/app_app_config.py delete mode 100644 nuon/models/app_app_config_status.py delete mode 100644 nuon/models/app_app_config_version.py delete mode 100644 nuon/models/app_app_input.py delete mode 100644 nuon/models/app_app_input_config.py delete mode 100644 nuon/models/app_app_input_group.py delete mode 100644 nuon/models/app_app_links.py delete mode 100644 nuon/models/app_app_permissions_config.py delete mode 100644 nuon/models/app_app_policies_config.py delete mode 100644 nuon/models/app_app_runner_config.py delete mode 100644 nuon/models/app_app_runner_config_env_vars.py delete mode 100644 nuon/models/app_app_runner_config_helm_driver_type.py delete mode 100644 nuon/models/app_app_runner_type.py delete mode 100644 nuon/models/app_app_sandbox_config.py delete mode 100644 nuon/models/app_app_sandbox_config_env_vars.py delete mode 100644 nuon/models/app_app_sandbox_config_variables.py delete mode 100644 nuon/models/app_app_secret.py delete mode 100644 nuon/models/app_app_secret_config.py delete mode 100644 nuon/models/app_app_secrets_config.py delete mode 100644 nuon/models/app_app_stack_config.py delete mode 100644 nuon/models/app_aws_account.py delete mode 100644 nuon/models/app_aws_stack_outputs.py delete mode 100644 nuon/models/app_awsecr_image_config.py delete mode 100644 nuon/models/app_awsiam_role_type.py delete mode 100644 nuon/models/app_azure_account.py delete mode 100644 nuon/models/app_azure_stack_outputs.py delete mode 100644 nuon/models/app_cloud_platform.py delete mode 100644 nuon/models/app_cloud_platform_region.py delete mode 100644 nuon/models/app_component.py delete mode 100644 nuon/models/app_component_build.py delete mode 100644 nuon/models/app_component_build_status.py delete mode 100644 nuon/models/app_component_config_connection.py delete mode 100644 nuon/models/app_component_links.py delete mode 100644 nuon/models/app_component_release.py delete mode 100644 nuon/models/app_component_release_step.py delete mode 100644 nuon/models/app_component_type.py delete mode 100644 nuon/models/app_composite_status.py delete mode 100644 nuon/models/app_composite_status_metadata.py delete mode 100644 nuon/models/app_connected_github_vcs_config.py delete mode 100644 nuon/models/app_docker_build_component_config.py delete mode 100644 nuon/models/app_docker_build_component_config_env_vars.py delete mode 100644 nuon/models/app_external_image_component_config.py delete mode 100644 nuon/models/app_helm_chart.py delete mode 100644 nuon/models/app_helm_component_config.py delete mode 100644 nuon/models/app_helm_component_config_values.py delete mode 100644 nuon/models/app_helm_config.py delete mode 100644 nuon/models/app_helm_config_values.py delete mode 100644 nuon/models/app_helm_release.py delete mode 100644 nuon/models/app_install.py delete mode 100644 nuon/models/app_install_action_workflow.py delete mode 100644 nuon/models/app_install_action_workflow_run.py delete mode 100644 nuon/models/app_install_action_workflow_run_outputs.py delete mode 100644 nuon/models/app_install_action_workflow_run_run_env_vars.py delete mode 100644 nuon/models/app_install_action_workflow_run_step.py delete mode 100644 nuon/models/app_install_action_workflow_run_step_status.py delete mode 100644 nuon/models/app_install_approval_option.py delete mode 100644 nuon/models/app_install_audit_log.py delete mode 100644 nuon/models/app_install_component.py delete mode 100644 nuon/models/app_install_component_links.py delete mode 100644 nuon/models/app_install_component_statuses.py delete mode 100644 nuon/models/app_install_component_summary.py delete mode 100644 nuon/models/app_install_config.py delete mode 100644 nuon/models/app_install_deploy.py delete mode 100644 nuon/models/app_install_deploy_outputs.py delete mode 100644 nuon/models/app_install_deploy_status.py delete mode 100644 nuon/models/app_install_deploy_type.py delete mode 100644 nuon/models/app_install_event.py delete mode 100644 nuon/models/app_install_event_payload.py delete mode 100644 nuon/models/app_install_inputs.py delete mode 100644 nuon/models/app_install_inputs_redacted_values.py delete mode 100644 nuon/models/app_install_inputs_values.py delete mode 100644 nuon/models/app_install_links.py delete mode 100644 nuon/models/app_install_sandbox.py delete mode 100644 nuon/models/app_install_sandbox_run.py delete mode 100644 nuon/models/app_install_sandbox_run_outputs.py delete mode 100644 nuon/models/app_install_stack.py delete mode 100644 nuon/models/app_install_stack_outputs.py delete mode 100644 nuon/models/app_install_stack_outputs_data.py delete mode 100644 nuon/models/app_install_stack_version.py delete mode 100644 nuon/models/app_install_stack_version_run.py delete mode 100644 nuon/models/app_install_stack_version_run_data.py delete mode 100644 nuon/models/app_install_state.py delete mode 100644 nuon/models/app_installer.py delete mode 100644 nuon/models/app_installer_metadata.py delete mode 100644 nuon/models/app_installer_type.py delete mode 100644 nuon/models/app_job_component_config.py delete mode 100644 nuon/models/app_job_component_config_env_vars.py delete mode 100644 nuon/models/app_json_map.py delete mode 100644 nuon/models/app_kubernetes_manifest_component_config.py delete mode 100644 nuon/models/app_log_stream.py delete mode 100644 nuon/models/app_log_stream_attrs.py delete mode 100644 nuon/models/app_notifications_config.py delete mode 100644 nuon/models/app_oci_artifact.py delete mode 100644 nuon/models/app_oci_artifact_annotations.py delete mode 100644 nuon/models/app_operation_status.py delete mode 100644 nuon/models/app_org.py delete mode 100644 nuon/models/app_org_invite.py delete mode 100644 nuon/models/app_org_invite_status.py delete mode 100644 nuon/models/app_org_links.py delete mode 100644 nuon/models/app_otel_log_record.py delete mode 100644 nuon/models/app_otel_log_record_log_attributes.py delete mode 100644 nuon/models/app_otel_log_record_resource_attributes.py delete mode 100644 nuon/models/app_otel_log_record_scope_attributes.py delete mode 100644 nuon/models/app_policy.py delete mode 100644 nuon/models/app_policy_name.py delete mode 100644 nuon/models/app_policy_permissions.py delete mode 100644 nuon/models/app_public_git_vcs_config.py delete mode 100644 nuon/models/app_role.py delete mode 100644 nuon/models/app_role_type.py delete mode 100644 nuon/models/app_runner.py delete mode 100644 nuon/models/app_runner_group.py delete mode 100644 nuon/models/app_runner_group_settings.py delete mode 100644 nuon/models/app_runner_group_settings_aws_tags.py delete mode 100644 nuon/models/app_runner_group_settings_metadata.py delete mode 100644 nuon/models/app_runner_group_type.py delete mode 100644 nuon/models/app_runner_health_check.py delete mode 100644 nuon/models/app_runner_heart_beat.py delete mode 100644 nuon/models/app_runner_job.py delete mode 100644 nuon/models/app_runner_job_execution.py delete mode 100644 nuon/models/app_runner_job_execution_outputs.py delete mode 100644 nuon/models/app_runner_job_execution_outputs_outputs.py delete mode 100644 nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py delete mode 100644 nuon/models/app_runner_job_execution_result.py delete mode 100644 nuon/models/app_runner_job_execution_result_error_metadata.py delete mode 100644 nuon/models/app_runner_job_execution_status.py delete mode 100644 nuon/models/app_runner_job_group.py delete mode 100644 nuon/models/app_runner_job_metadata.py delete mode 100644 nuon/models/app_runner_job_operation_type.py delete mode 100644 nuon/models/app_runner_job_outputs.py delete mode 100644 nuon/models/app_runner_job_status.py delete mode 100644 nuon/models/app_runner_job_type.py delete mode 100644 nuon/models/app_runner_operation.py delete mode 100644 nuon/models/app_runner_operation_type.py delete mode 100644 nuon/models/app_runner_status.py delete mode 100644 nuon/models/app_sandbox_run_type.py delete mode 100644 nuon/models/app_stack_type.py delete mode 100644 nuon/models/app_status.py delete mode 100644 nuon/models/app_step_error_behavior.py delete mode 100644 nuon/models/app_terraform_lock.py delete mode 100644 nuon/models/app_terraform_module_component_config.py delete mode 100644 nuon/models/app_terraform_module_component_config_env_vars.py delete mode 100644 nuon/models/app_terraform_module_component_config_variables.py delete mode 100644 nuon/models/app_terraform_state_instance.py delete mode 100644 nuon/models/app_terraform_state_instance_attributes.py delete mode 100644 nuon/models/app_terraform_state_resource.py delete mode 100644 nuon/models/app_terraform_workspace.py delete mode 100644 nuon/models/app_terraform_workspace_lock.py delete mode 100644 nuon/models/app_terraform_workspace_state.py delete mode 100644 nuon/models/app_terraform_workspace_state_json.py delete mode 100644 nuon/models/app_vcs_connection.py delete mode 100644 nuon/models/app_vcs_connection_commit.py delete mode 100644 nuon/models/app_waitlist.py delete mode 100644 nuon/models/app_workflow.py delete mode 100644 nuon/models/app_workflow_links.py delete mode 100644 nuon/models/app_workflow_metadata.py delete mode 100644 nuon/models/app_workflow_step.py delete mode 100644 nuon/models/app_workflow_step_approval.py delete mode 100644 nuon/models/app_workflow_step_approval_response.py delete mode 100644 nuon/models/app_workflow_step_approval_type.py delete mode 100644 nuon/models/app_workflow_step_execution_type.py delete mode 100644 nuon/models/app_workflow_step_links.py delete mode 100644 nuon/models/app_workflow_step_metadata.py delete mode 100644 nuon/models/app_workflow_step_policy_validation.py delete mode 100644 nuon/models/app_workflow_step_response_type.py delete mode 100644 nuon/models/app_workflow_type.py delete mode 100644 nuon/models/config_app_policy_type.py delete mode 100644 nuon/models/get_app_config_template_type.py delete mode 100644 nuon/models/get_config_schema_response_200.py delete mode 100644 nuon/models/get_install_component_outputs_response_200.py delete mode 100644 nuon/models/get_terraform_workspace_state_json_resources_response_200.py delete mode 100644 nuon/models/get_terraform_workspace_states_json_by_id_response_200.py delete mode 100644 nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py delete mode 100644 nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py delete mode 100644 nuon/models/helpers_create_install_config_params.py delete mode 100644 nuon/models/lock_terraform_workspace_body.py delete mode 100644 nuon/models/outputs_secret_sync_output.py delete mode 100644 nuon/models/permissions_permission.py delete mode 100644 nuon/models/permissions_set.py delete mode 100644 nuon/models/refs_ref.py delete mode 100644 nuon/models/refs_ref_type.py delete mode 100644 nuon/models/service_app_awsiam_policy_config.py delete mode 100644 nuon/models/service_app_awsiam_role_config.py delete mode 100644 nuon/models/service_app_config_template.py delete mode 100644 nuon/models/service_app_config_template_type.py delete mode 100644 nuon/models/service_app_group_request.py delete mode 100644 nuon/models/service_app_input_request.py delete mode 100644 nuon/models/service_app_policy_config.py delete mode 100644 nuon/models/service_app_secret_config.py delete mode 100644 nuon/models/service_aws_ecr_image_config_request.py delete mode 100644 nuon/models/service_cancel_runner_job_request.py delete mode 100644 nuon/models/service_cli_config.py delete mode 100644 nuon/models/service_component_children.py delete mode 100644 nuon/models/service_connected_github_vcs_action_workflow_config_request.py delete mode 100644 nuon/models/service_connected_github_vcs_config_request.py delete mode 100644 nuon/models/service_connected_github_vcs_sandbox_config_request.py delete mode 100644 nuon/models/service_create_action_workflow_config_request.py delete mode 100644 nuon/models/service_create_action_workflow_config_step_request.py delete mode 100644 nuon/models/service_create_action_workflow_config_step_request_env_vars.py delete mode 100644 nuon/models/service_create_action_workflow_config_trigger_request.py delete mode 100644 nuon/models/service_create_app_action_workflow_request.py delete mode 100644 nuon/models/service_create_app_branch_request.py delete mode 100644 nuon/models/service_create_app_break_glass_config_request.py delete mode 100644 nuon/models/service_create_app_config_request.py delete mode 100644 nuon/models/service_create_app_input_config_request.py delete mode 100644 nuon/models/service_create_app_input_config_request_groups.py delete mode 100644 nuon/models/service_create_app_input_config_request_inputs.py delete mode 100644 nuon/models/service_create_app_permissions_config_request.py delete mode 100644 nuon/models/service_create_app_policies_config_request.py delete mode 100644 nuon/models/service_create_app_request.py delete mode 100644 nuon/models/service_create_app_runner_config_request.py delete mode 100644 nuon/models/service_create_app_runner_config_request_env_vars.py delete mode 100644 nuon/models/service_create_app_sandbox_config_request.py delete mode 100644 nuon/models/service_create_app_sandbox_config_request_env_vars.py delete mode 100644 nuon/models/service_create_app_sandbox_config_request_variables.py delete mode 100644 nuon/models/service_create_app_secret_request.py delete mode 100644 nuon/models/service_create_app_secrets_config_request.py delete mode 100644 nuon/models/service_create_app_stack_config_request.py delete mode 100644 nuon/models/service_create_component_build_request.py delete mode 100644 nuon/models/service_create_component_release_request.py delete mode 100644 nuon/models/service_create_component_release_request_strategy.py delete mode 100644 nuon/models/service_create_component_request.py delete mode 100644 nuon/models/service_create_connection_callback_request.py delete mode 100644 nuon/models/service_create_connection_request.py delete mode 100644 nuon/models/service_create_docker_build_component_config_request.py delete mode 100644 nuon/models/service_create_docker_build_component_config_request_env_vars.py delete mode 100644 nuon/models/service_create_external_image_component_config_request.py delete mode 100644 nuon/models/service_create_helm_component_config_request.py delete mode 100644 nuon/models/service_create_helm_component_config_request_values.py delete mode 100644 nuon/models/service_create_install_action_workflow_run_request.py delete mode 100644 nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py delete mode 100644 nuon/models/service_create_install_config_request.py delete mode 100644 nuon/models/service_create_install_deploy_request.py delete mode 100644 nuon/models/service_create_install_inputs_request.py delete mode 100644 nuon/models/service_create_install_inputs_request_inputs.py delete mode 100644 nuon/models/service_create_install_request.py delete mode 100644 nuon/models/service_create_install_request_aws_account.py delete mode 100644 nuon/models/service_create_install_request_azure_account.py delete mode 100644 nuon/models/service_create_install_request_inputs.py delete mode 100644 nuon/models/service_create_installer_request.py delete mode 100644 nuon/models/service_create_installer_request_metadata.py delete mode 100644 nuon/models/service_create_job_component_config_request.py delete mode 100644 nuon/models/service_create_job_component_config_request_env_vars.py delete mode 100644 nuon/models/service_create_kubernetes_manifest_component_config_request.py delete mode 100644 nuon/models/service_create_org_invite_request.py delete mode 100644 nuon/models/service_create_org_request.py delete mode 100644 nuon/models/service_create_org_user_request.py delete mode 100644 nuon/models/service_create_terraform_module_component_config_request.py delete mode 100644 nuon/models/service_create_terraform_module_component_config_request_env_vars.py delete mode 100644 nuon/models/service_create_terraform_module_component_config_request_variables.py delete mode 100644 nuon/models/service_create_terraform_workspace_request.py delete mode 100644 nuon/models/service_create_workflow_step_approval_response_request.py delete mode 100644 nuon/models/service_deploy_install_components_request.py delete mode 100644 nuon/models/service_deprovision_install_request.py delete mode 100644 nuon/models/service_deprovision_install_sandbox_request.py delete mode 100644 nuon/models/service_force_shutdown_request.py delete mode 100644 nuon/models/service_forget_install_request.py delete mode 100644 nuon/models/service_graceful_shutdown_request.py delete mode 100644 nuon/models/service_install_phone_home_request.py delete mode 100644 nuon/models/service_mng_shut_down_request.py delete mode 100644 nuon/models/service_mng_update_request.py delete mode 100644 nuon/models/service_mng_vm_shut_down_request.py delete mode 100644 nuon/models/service_public_git_vcs_action_workflow_config_request.py delete mode 100644 nuon/models/service_public_git_vcs_config_request.py delete mode 100644 nuon/models/service_public_git_vcs_sandbox_config_request.py delete mode 100644 nuon/models/service_readme.py delete mode 100644 nuon/models/service_remove_org_user_request.py delete mode 100644 nuon/models/service_rendered_installer.py delete mode 100644 nuon/models/service_reprovision_install_request.py delete mode 100644 nuon/models/service_reprovision_install_sandbox_request.py delete mode 100644 nuon/models/service_retry_workflow_by_id_request.py delete mode 100644 nuon/models/service_retry_workflow_by_id_response.py delete mode 100644 nuon/models/service_retry_workflow_request.py delete mode 100644 nuon/models/service_retry_workflow_response.py delete mode 100644 nuon/models/service_runner_connection_status.py delete mode 100644 nuon/models/service_sync_secrets_request.py delete mode 100644 nuon/models/service_teardown_install_component_request.py delete mode 100644 nuon/models/service_teardown_install_components_request.py delete mode 100644 nuon/models/service_update_action_workflow_request.py delete mode 100644 nuon/models/service_update_app_config_installs_request.py delete mode 100644 nuon/models/service_update_app_config_request.py delete mode 100644 nuon/models/service_update_app_request.py delete mode 100644 nuon/models/service_update_component_request.py delete mode 100644 nuon/models/service_update_install_config_request.py delete mode 100644 nuon/models/service_update_install_inputs_request.py delete mode 100644 nuon/models/service_update_install_inputs_request_inputs.py delete mode 100644 nuon/models/service_update_install_request.py delete mode 100644 nuon/models/service_update_installer_request.py delete mode 100644 nuon/models/service_update_installer_request_metadata.py delete mode 100644 nuon/models/service_update_org_request.py delete mode 100644 nuon/models/service_update_runner_settings_request.py delete mode 100644 nuon/models/service_update_workflow_request.py delete mode 100644 nuon/models/service_waitlist_request.py delete mode 100644 nuon/models/state_action_workflow_state.py delete mode 100644 nuon/models/state_action_workflow_state_outputs.py delete mode 100644 nuon/models/state_actions_state.py delete mode 100644 nuon/models/state_actions_state_workflows.py delete mode 100644 nuon/models/state_app_state.py delete mode 100644 nuon/models/state_app_state_secrets.py delete mode 100644 nuon/models/state_aws_cloud_account.py delete mode 100644 nuon/models/state_azure_cloud_account.py delete mode 100644 nuon/models/state_cloud_account.py delete mode 100644 nuon/models/state_domain_state.py delete mode 100644 nuon/models/state_inputs_state.py delete mode 100644 nuon/models/state_inputs_state_inputs.py delete mode 100644 nuon/models/state_install_stack_state.py delete mode 100644 nuon/models/state_install_stack_state_outputs.py delete mode 100644 nuon/models/state_install_state.py delete mode 100644 nuon/models/state_install_state_inputs.py delete mode 100644 nuon/models/state_org_state.py delete mode 100644 nuon/models/state_runner_state.py delete mode 100644 nuon/models/state_sandbox_state.py delete mode 100644 nuon/models/state_sandbox_state_outputs.py delete mode 100644 nuon/models/state_secrets_state.py delete mode 100644 nuon/models/stderr_err_response.py delete mode 100644 nuon/models/types_string_bool_map.py delete mode 100644 nuon/models/unlock_terraform_workspace_body.py delete mode 100644 nuon/models/update_terraform_state_body.py delete mode 100644 nuon/py.typed delete mode 100644 nuon/types.py delete mode 100644 version.txt diff --git a/nuon/__init__.py b/nuon/__init__.py deleted file mode 100644 index 22f4148a..00000000 --- a/nuon/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -"""A client library for accessing Nuon""" - -from .client import AuthenticatedClient, Client - -__all__ = ( - "AuthenticatedClient", - "Client", -) diff --git a/nuon/api/__init__.py b/nuon/api/__init__.py deleted file mode 100644 index 81f9fa24..00000000 --- a/nuon/api/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains methods for accessing the API""" diff --git a/nuon/api/actions/__init__.py b/nuon/api/actions/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/actions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/actions/create_action_workflow_config.py b/nuon/api/actions/create_action_workflow_config.py deleted file mode 100644 index 1f8e6777..00000000 --- a/nuon/api/actions/create_action_workflow_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow_config import AppActionWorkflowConfig -from ...models.service_create_action_workflow_config_request import ServiceCreateActionWorkflowConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - action_workflow_id: str, - *, - body: ServiceCreateActionWorkflowConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/action-workflows/{action_workflow_id}/configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppActionWorkflowConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateActionWorkflowConfigRequest, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """create action workflow config - - Args: - action_workflow_id (str): - body (ServiceCreateActionWorkflowConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateActionWorkflowConfigRequest, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """create action workflow config - - Args: - action_workflow_id (str): - body (ServiceCreateActionWorkflowConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] - """ - - return sync_detailed( - action_workflow_id=action_workflow_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateActionWorkflowConfigRequest, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """create action workflow config - - Args: - action_workflow_id (str): - body (ServiceCreateActionWorkflowConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateActionWorkflowConfigRequest, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """create action workflow config - - Args: - action_workflow_id (str): - body (ServiceCreateActionWorkflowConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - action_workflow_id=action_workflow_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/actions/create_app_action_workflow.py b/nuon/api/actions/create_app_action_workflow.py deleted file mode 100644 index 753a4564..00000000 --- a/nuon/api/actions/create_app_action_workflow.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow import AppActionWorkflow -from ...models.service_create_app_action_workflow_request import ServiceCreateAppActionWorkflowRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppActionWorkflowRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/action-workflows", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppActionWorkflow.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app - - Args: - app_id (str): - body (ServiceCreateAppActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app - - Args: - app_id (str): - body (ServiceCreateAppActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app - - Args: - app_id (str): - body (ServiceCreateAppActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app - - Args: - app_id (str): - body (ServiceCreateAppActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/actions/create_install_action_workflow_run.py b/nuon/api/actions/create_install_action_workflow_run.py deleted file mode 100644 index 15e959ce..00000000 --- a/nuon/api/actions/create_install_action_workflow_run.py +++ /dev/null @@ -1,203 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_create_install_action_workflow_run_request import ServiceCreateInstallActionWorkflowRunRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceCreateInstallActionWorkflowRunRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/action-workflows/runs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Response[Union[StderrErrResponse, str]]: - """create an action workflow run for an install - - AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses - currently install id to lookup related appworkflowconfigId - - Args: - install_id (str): - body (ServiceCreateInstallActionWorkflowRunRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """create an action workflow run for an install - - AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses - currently install id to lookup related appworkflowconfigId - - Args: - install_id (str): - body (ServiceCreateInstallActionWorkflowRunRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Response[Union[StderrErrResponse, str]]: - """create an action workflow run for an install - - AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses - currently install id to lookup related appworkflowconfigId - - Args: - install_id (str): - body (ServiceCreateInstallActionWorkflowRunRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """create an action workflow run for an install - - AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses - currently install id to lookup related appworkflowconfigId - - Args: - install_id (str): - body (ServiceCreateInstallActionWorkflowRunRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/actions/delete_action_workflow.py b/nuon/api/actions/delete_action_workflow.py deleted file mode 100644 index a2a139d7..00000000 --- a/nuon/api/actions/delete_action_workflow.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - action_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/action-workflows/{action_workflow_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - action_workflow_id=action_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - action_workflow_id=action_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_action_workflow.py b/nuon/api/actions/get_action_workflow.py deleted file mode 100644 index 2433963c..00000000 --- a/nuon/api/actions/get_action_workflow.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow import AppActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - action_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/action-workflows/{action_workflow_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppActionWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return sync_detailed( - action_workflow_id=action_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - action_workflow_id=action_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_action_workflow_config.py b/nuon/api/actions/get_action_workflow_config.py deleted file mode 100644 index f0b24d8c..00000000 --- a/nuon/api/actions/get_action_workflow_config.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow_config import AppActionWorkflowConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - action_workflow_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/action-workflows/configs/{action_workflow_config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppActionWorkflowConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow config - - Args: - action_workflow_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_config_id=action_workflow_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow config - - Args: - action_workflow_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] - """ - - return sync_detailed( - action_workflow_config_id=action_workflow_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - action_workflow_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow config - - Args: - action_workflow_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_config_id=action_workflow_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow config - - Args: - action_workflow_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - action_workflow_config_id=action_workflow_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_action_workflow_configs.py b/nuon/api/actions/get_action_workflow_configs.py deleted file mode 100644 index e1bbe7ac..00000000 --- a/nuon/api/actions/get_action_workflow_configs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow_config import AppActionWorkflowConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - action_workflow_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/action-workflows/{action_workflow_id}/configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppActionWorkflowConfig.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: - """get action workflow for an app - - Args: - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: - """get action workflow for an app - - Args: - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppActionWorkflowConfig']] - """ - - return sync_detailed( - action_workflow_id=action_workflow_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: - """get action workflow for an app - - Args: - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: - """get action workflow for an app - - Args: - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppActionWorkflowConfig']] - """ - - return ( - await asyncio_detailed( - action_workflow_id=action_workflow_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/actions/get_action_workflow_latest_config.py b/nuon/api/actions/get_action_workflow_latest_config.py deleted file mode 100644 index 74f7599e..00000000 --- a/nuon/api/actions/get_action_workflow_latest_config.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow_config import AppActionWorkflowConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - action_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/action-workflows/{action_workflow_id}/latest-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppActionWorkflowConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow's latest config - - Return the latest config for an action workflow. - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow's latest config - - Return the latest config for an action workflow. - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] - """ - - return sync_detailed( - action_workflow_id=action_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow's latest config - - Return the latest config for an action workflow. - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: - """get an app action workflow's latest config - - Return the latest config for an action workflow. - - Args: - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - action_workflow_id=action_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_action_workflows.py b/nuon/api/actions/get_action_workflows.py deleted file mode 100644 index 35ddbd91..00000000 --- a/nuon/api/actions/get_action_workflows.py +++ /dev/null @@ -1,260 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow import AppActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["q"] = q - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/action-workflows", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppActionWorkflow.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: - """get action workflows for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppActionWorkflow']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: - """get action workflows for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppActionWorkflow']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: - """get action workflows for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppActionWorkflow']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: - """get action workflows for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppActionWorkflow']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/actions/get_app_action_workflow.py b/nuon/api/actions/get_app_action_workflow.py deleted file mode 100644 index 00a47b9a..00000000 --- a/nuon/api/actions/get_app_action_workflow.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow import AppActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - action_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/action-workflows/{action_workflow_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppActionWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - app_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - action_workflow_id=action_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - app_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - action_workflow_id=action_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - app_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - action_workflow_id=action_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow - - Args: - app_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - action_workflow_id=action_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_recent_runs.py b/nuon/api/actions/get_install_action_workflow_recent_runs.py deleted file mode 100644 index 79a6e21a..00000000 --- a/nuon/api/actions/get_install_action_workflow_recent_runs.py +++ /dev/null @@ -1,253 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow import AppInstallActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - action_workflow_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows/{action_workflow_id}/recent-runs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallActionWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get recent runs for an action workflow by install id - - Args: - install_id (str): - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - action_workflow_id=action_workflow_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get recent runs for an action workflow by install id - - Args: - install_id (str): - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - action_workflow_id=action_workflow_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get recent runs for an action workflow by install id - - Args: - install_id (str): - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - action_workflow_id=action_workflow_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get recent runs for an action workflow by install id - - Args: - install_id (str): - action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - action_workflow_id=action_workflow_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_run.py b/nuon/api/actions/get_install_action_workflow_run.py deleted file mode 100644 index 9fdb3a42..00000000 --- a/nuon/api/actions/get_install_action_workflow_run.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows/runs/{run_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallActionWorkflowRun.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - run_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: - """get action workflow runs by install id and run id - - Args: - install_id (str): - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - run_id=run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - run_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: - """get action workflow runs by install id and run id - - Args: - install_id (str): - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflowRun, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - run_id=run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - run_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: - """get action workflow runs by install id and run id - - Args: - install_id (str): - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - run_id=run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - run_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: - """get action workflow runs by install id and run id - - Args: - install_id (str): - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflowRun, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - run_id=run_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_run_step.py b/nuon/api/actions/get_install_action_workflow_run_step.py deleted file mode 100644 index c0607d91..00000000 --- a/nuon/api/actions/get_install_action_workflow_run_step.py +++ /dev/null @@ -1,205 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - workflow_run_id: str, - step_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows/runs/{workflow_run_id}/steps/{step_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallActionWorkflowRunStep.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - workflow_run_id: str, - step_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: - """get action workflow run step by install id and step id - - Get an install action workflow run step. - - Args: - install_id (str): - workflow_run_id (str): - step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - workflow_run_id=workflow_run_id, - step_id=step_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - workflow_run_id: str, - step_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: - """get action workflow run step by install id and step id - - Get an install action workflow run step. - - Args: - install_id (str): - workflow_run_id (str): - step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflowRunStep, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - workflow_run_id=workflow_run_id, - step_id=step_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - workflow_run_id: str, - step_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: - """get action workflow run step by install id and step id - - Get an install action workflow run step. - - Args: - install_id (str): - workflow_run_id (str): - step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - workflow_run_id=workflow_run_id, - step_id=step_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - workflow_run_id: str, - step_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: - """get action workflow run step by install id and step id - - Get an install action workflow run step. - - Args: - install_id (str): - workflow_run_id (str): - step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflowRunStep, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - workflow_run_id=workflow_run_id, - step_id=step_id, - client=client, - ) - ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_runs.py b/nuon/api/actions/get_install_action_workflow_runs.py deleted file mode 100644 index e61c86ca..00000000 --- a/nuon/api/actions/get_install_action_workflow_runs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows/runs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallActionWorkflowRun.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: - """get action workflow runs by install id - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: - """get action workflow runs by install id - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: - """get action workflow runs by install id - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: - """get action workflow runs by install id - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/actions/get_install_action_workflows_latest_runs.py b/nuon/api/actions/get_install_action_workflows_latest_runs.py deleted file mode 100644 index 8ddcd813..00000000 --- a/nuon/api/actions/get_install_action_workflows_latest_runs.py +++ /dev/null @@ -1,275 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow import AppInstallActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - trigger_types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["trigger_types"] = trigger_types - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params["q"] = q - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows/latest-runs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - trigger_types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get latest runs for all action workflows by install id - - Args: - install_id (str): - trigger_types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - trigger_types=trigger_types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - trigger_types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get latest runs for all action workflows by install id - - Args: - install_id (str): - trigger_types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallActionWorkflow']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - trigger_types=trigger_types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - trigger_types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get latest runs for all action workflows by install id - - Args: - install_id (str): - trigger_types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - trigger_types=trigger_types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - trigger_types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get latest runs for all action workflows by install id - - Args: - install_id (str): - trigger_types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallActionWorkflow']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - trigger_types=trigger_types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/actions/update_app_action_workflow.py b/nuon/api/actions/update_app_action_workflow.py deleted file mode 100644 index a43f36df..00000000 --- a/nuon/api/actions/update_app_action_workflow.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_action_workflow import AppActionWorkflow -from ...models.service_update_action_workflow_request import ServiceUpdateActionWorkflowRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - action_workflow_id: str, - *, - body: ServiceUpdateActionWorkflowRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/action-workflows/{action_workflow_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppActionWorkflow.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """patch an app - - Args: - action_workflow_id (str): - body (ServiceUpdateActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """patch an app - - Args: - action_workflow_id (str): - body (ServiceUpdateActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return sync_detailed( - action_workflow_id=action_workflow_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """patch an app - - Args: - action_workflow_id (str): - body (ServiceUpdateActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - action_workflow_id=action_workflow_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - action_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """patch an app - - Args: - action_workflow_id (str): - body (ServiceUpdateActionWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppActionWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - action_workflow_id=action_workflow_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/__init__.py b/nuon/api/apps/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/apps/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/apps/create_app.py b/nuon/api/apps/create_app.py deleted file mode 100644 index 0dbc8296..00000000 --- a/nuon/api/apps/create_app.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app import AppApp -from ...models.service_create_app_request import ServiceCreateAppRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateAppRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/apps", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppApp, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppApp.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppApp, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: - """create an app - - Args: - body (ServiceCreateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppApp, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: - """create an app - - Args: - body (ServiceCreateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppApp, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: - """create an app - - Args: - body (ServiceCreateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppApp, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: - """create an app - - Args: - body (ServiceCreateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppApp, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_branch.py b/nuon/api/apps/create_app_branch.py deleted file mode 100644 index d5333471..00000000 --- a/nuon/api/apps/create_app_branch.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_branch import AppAppBranch -from ...models.service_create_app_branch_request import ServiceCreateAppBranchRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppBranchRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/branches", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBranch, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppBranch.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBranch, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBranchRequest, -) -> Response[Union[AppAppBranch, StderrErrResponse]]: - """Cancel a runner job. - - Args: - app_id (str): - body (ServiceCreateAppBranchRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBranch, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBranchRequest, -) -> Optional[Union[AppAppBranch, StderrErrResponse]]: - """Cancel a runner job. - - Args: - app_id (str): - body (ServiceCreateAppBranchRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBranch, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBranchRequest, -) -> Response[Union[AppAppBranch, StderrErrResponse]]: - """Cancel a runner job. - - Args: - app_id (str): - body (ServiceCreateAppBranchRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBranch, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBranchRequest, -) -> Optional[Union[AppAppBranch, StderrErrResponse]]: - """Cancel a runner job. - - Args: - app_id (str): - body (ServiceCreateAppBranchRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBranch, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_break_glass_config.py b/nuon/api/apps/create_app_break_glass_config.py deleted file mode 100644 index 6e505528..00000000 --- a/nuon/api/apps/create_app_break_glass_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_break_glass_config import AppAppBreakGlassConfig -from ...models.service_create_app_break_glass_config_request import ServiceCreateAppBreakGlassConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppBreakGlassConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/break-glass-configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppBreakGlassConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBreakGlassConfigRequest, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """Create a break glass config for an app. - - Args: - app_id (str): - body (ServiceCreateAppBreakGlassConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBreakGlassConfigRequest, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """Create a break glass config for an app. - - Args: - app_id (str): - body (ServiceCreateAppBreakGlassConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBreakGlassConfigRequest, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """Create a break glass config for an app. - - Args: - app_id (str): - body (ServiceCreateAppBreakGlassConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppBreakGlassConfigRequest, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """Create a break glass config for an app. - - Args: - app_id (str): - body (ServiceCreateAppBreakGlassConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_config.py b/nuon/api/apps/create_app_config.py deleted file mode 100644 index dc44563f..00000000 --- a/nuon/api/apps/create_app_config.py +++ /dev/null @@ -1,201 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_config import AppAppConfig -from ...models.service_create_app_config_request import ServiceCreateAppConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/config", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """Create an app config, by pushing the contents of a config file. - - The API will automatically configure the app according to the config file in the background. - - Args: - app_id (str): - body (ServiceCreateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """Create an app config, by pushing the contents of a config file. - - The API will automatically configure the app according to the config file in the background. - - Args: - app_id (str): - body (ServiceCreateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """Create an app config, by pushing the contents of a config file. - - The API will automatically configure the app according to the config file in the background. - - Args: - app_id (str): - body (ServiceCreateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """Create an app config, by pushing the contents of a config file. - - The API will automatically configure the app according to the config file in the background. - - Args: - app_id (str): - body (ServiceCreateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_input_config.py b/nuon/api/apps/create_app_input_config.py deleted file mode 100644 index ea97c5a5..00000000 --- a/nuon/api/apps/create_app_input_config.py +++ /dev/null @@ -1,201 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_input_config import AppAppInputConfig -from ...models.service_create_app_input_config_request import ServiceCreateAppInputConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppInputConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/input-config", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppInputConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppInputConfigRequest, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - """App input configs allow you to declare the inputs for your application, and do things such as - require customer inputs or - expose configuration knobs in your application. - - Args: - app_id (str): - body (ServiceCreateAppInputConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppInputConfigRequest, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - """App input configs allow you to declare the inputs for your application, and do things such as - require customer inputs or - expose configuration knobs in your application. - - Args: - app_id (str): - body (ServiceCreateAppInputConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppInputConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppInputConfigRequest, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - """App input configs allow you to declare the inputs for your application, and do things such as - require customer inputs or - expose configuration knobs in your application. - - Args: - app_id (str): - body (ServiceCreateAppInputConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppInputConfigRequest, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - """App input configs allow you to declare the inputs for your application, and do things such as - require customer inputs or - expose configuration knobs in your application. - - Args: - app_id (str): - body (ServiceCreateAppInputConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppInputConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_permissions_config.py b/nuon/api/apps/create_app_permissions_config.py deleted file mode 100644 index 36207c5f..00000000 --- a/nuon/api/apps/create_app_permissions_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_permissions_config import AppAppPermissionsConfig -from ...models.service_create_app_permissions_config_request import ServiceCreateAppPermissionsConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppPermissionsConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/permissions-configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppPermissionsConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPermissionsConfigRequest, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """Create app permissions config. - - Args: - app_id (str): - body (ServiceCreateAppPermissionsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPermissionsConfigRequest, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """Create app permissions config. - - Args: - app_id (str): - body (ServiceCreateAppPermissionsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPermissionsConfigRequest, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """Create app permissions config. - - Args: - app_id (str): - body (ServiceCreateAppPermissionsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPermissionsConfigRequest, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """Create app permissions config. - - Args: - app_id (str): - body (ServiceCreateAppPermissionsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_policies_config.py b/nuon/api/apps/create_app_policies_config.py deleted file mode 100644 index 48b21955..00000000 --- a/nuon/api/apps/create_app_policies_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_policies_config import AppAppPoliciesConfig -from ...models.service_create_app_policies_config_request import ServiceCreateAppPoliciesConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppPoliciesConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/policies-configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppPoliciesConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPoliciesConfigRequest, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """Create app policies config. - - Args: - app_id (str): - body (ServiceCreateAppPoliciesConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPoliciesConfigRequest, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """Create app policies config. - - Args: - app_id (str): - body (ServiceCreateAppPoliciesConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPoliciesConfigRequest, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """Create app policies config. - - Args: - app_id (str): - body (ServiceCreateAppPoliciesConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppPoliciesConfigRequest, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """Create app policies config. - - Args: - app_id (str): - body (ServiceCreateAppPoliciesConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_runner_config.py b/nuon/api/apps/create_app_runner_config.py deleted file mode 100644 index 053e48ec..00000000 --- a/nuon/api/apps/create_app_runner_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_runner_config import AppAppRunnerConfig -from ...models.service_create_app_runner_config_request import ServiceCreateAppRunnerConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppRunnerConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/runner-configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppRunnerConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppRunnerConfigRequest, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: - """create an app runner config - - Args: - app_id (str): - body (ServiceCreateAppRunnerConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppRunnerConfigRequest, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: - """create an app runner config - - Args: - app_id (str): - body (ServiceCreateAppRunnerConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppRunnerConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppRunnerConfigRequest, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: - """create an app runner config - - Args: - app_id (str): - body (ServiceCreateAppRunnerConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppRunnerConfigRequest, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: - """create an app runner config - - Args: - app_id (str): - body (ServiceCreateAppRunnerConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppRunnerConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_sandbox_config.py b/nuon/api/apps/create_app_sandbox_config.py deleted file mode 100644 index dfe904ec..00000000 --- a/nuon/api/apps/create_app_sandbox_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_sandbox_config import AppAppSandboxConfig -from ...models.service_create_app_sandbox_config_request import ServiceCreateAppSandboxConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppSandboxConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/sandbox-config", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppSandboxConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSandboxConfigRequest, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: - """create an app sandbox config - - Args: - app_id (str): - body (ServiceCreateAppSandboxConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSandboxConfigRequest, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: - """create an app sandbox config - - Args: - app_id (str): - body (ServiceCreateAppSandboxConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSandboxConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSandboxConfigRequest, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: - """create an app sandbox config - - Args: - app_id (str): - body (ServiceCreateAppSandboxConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSandboxConfigRequest, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: - """create an app sandbox config - - Args: - app_id (str): - body (ServiceCreateAppSandboxConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSandboxConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_secret.py b/nuon/api/apps/create_app_secret.py deleted file mode 100644 index c34d0203..00000000 --- a/nuon/api/apps/create_app_secret.py +++ /dev/null @@ -1,213 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_secret import AppAppSecret -from ...models.service_create_app_secret_request import ServiceCreateAppSecretRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppSecretRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/secret", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecret, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppSecret.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecret, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretRequest, -) -> Response[Union[AppAppSecret, StderrErrResponse]]: - """create an app secret - - Create an app secret that can be used to configure components. To reference an app secret, use - `.nuon.secrets.`. - - **NOTE** secrets can only be written, or deleted, not read. - - Args: - app_id (str): - body (ServiceCreateAppSecretRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecret, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretRequest, -) -> Optional[Union[AppAppSecret, StderrErrResponse]]: - """create an app secret - - Create an app secret that can be used to configure components. To reference an app secret, use - `.nuon.secrets.`. - - **NOTE** secrets can only be written, or deleted, not read. - - Args: - app_id (str): - body (ServiceCreateAppSecretRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecret, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretRequest, -) -> Response[Union[AppAppSecret, StderrErrResponse]]: - """create an app secret - - Create an app secret that can be used to configure components. To reference an app secret, use - `.nuon.secrets.`. - - **NOTE** secrets can only be written, or deleted, not read. - - Args: - app_id (str): - body (ServiceCreateAppSecretRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecret, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretRequest, -) -> Optional[Union[AppAppSecret, StderrErrResponse]]: - """create an app secret - - Create an app secret that can be used to configure components. To reference an app secret, use - `.nuon.secrets.`. - - **NOTE** secrets can only be written, or deleted, not read. - - Args: - app_id (str): - body (ServiceCreateAppSecretRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecret, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_secrets_config.py b/nuon/api/apps/create_app_secrets_config.py deleted file mode 100644 index a95f8faf..00000000 --- a/nuon/api/apps/create_app_secrets_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_secrets_config import AppAppSecretsConfig -from ...models.service_create_app_secrets_config_request import ServiceCreateAppSecretsConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppSecretsConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/secrets-configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppSecretsConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretsConfigRequest, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - """Create an app secrets config. - - Args: - app_id (str): - body (ServiceCreateAppSecretsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretsConfigRequest, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - """Create an app secrets config. - - Args: - app_id (str): - body (ServiceCreateAppSecretsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecretsConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretsConfigRequest, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - """Create an app secrets config. - - Args: - app_id (str): - body (ServiceCreateAppSecretsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppSecretsConfigRequest, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - """Create an app secrets config. - - Args: - app_id (str): - body (ServiceCreateAppSecretsConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecretsConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/create_app_stack_config.py b/nuon/api/apps/create_app_stack_config.py deleted file mode 100644 index b0a2d884..00000000 --- a/nuon/api/apps/create_app_stack_config.py +++ /dev/null @@ -1,201 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_stack_config import AppAppStackConfig -from ...models.service_create_app_stack_config_request import ServiceCreateAppStackConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateAppStackConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/stack-configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppStackConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppStackConfigRequest, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: - """create an app stack config - - Create a cloudformation stack config - - Args: - app_id (str): - body (ServiceCreateAppStackConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppStackConfigRequest, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: - """create an app stack config - - Create a cloudformation stack config - - Args: - app_id (str): - body (ServiceCreateAppStackConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppStackConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppStackConfigRequest, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: - """create an app stack config - - Create a cloudformation stack config - - Args: - app_id (str): - body (ServiceCreateAppStackConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateAppStackConfigRequest, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: - """create an app stack config - - Create a cloudformation stack config - - Args: - app_id (str): - body (ServiceCreateAppStackConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppStackConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/delete_app.py b/nuon/api/apps/delete_app.py deleted file mode 100644 index 6f11884e..00000000 --- a/nuon/api/apps/delete_app.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/apps/{app_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/delete_app_secret.py b/nuon/api/apps/delete_app_secret.py deleted file mode 100644 index 7dba5f5a..00000000 --- a/nuon/api/apps/delete_app_secret.py +++ /dev/null @@ -1,190 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - secret_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/apps/{app_id}/secret/{secret_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - secret_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an app secret - - Delete an app secret. - - Args: - app_id (str): - secret_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - secret_id=secret_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - secret_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app secret - - Delete an app secret. - - Args: - app_id (str): - secret_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - app_id=app_id, - secret_id=secret_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - secret_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an app secret - - Delete an app secret. - - Args: - app_id (str): - secret_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - secret_id=secret_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - secret_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app secret - - Delete an app secret. - - Args: - app_id (str): - secret_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - secret_id=secret_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app.py b/nuon/api/apps/get_app.py deleted file mode 100644 index 078fc2ba..00000000 --- a/nuon/api/apps/get_app.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app import AppApp -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppApp, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppApp.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppApp, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppApp, StderrErrResponse]]: - """get an app - - Return an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppApp, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppApp, StderrErrResponse]]: - """get an app - - Return an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppApp, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppApp, StderrErrResponse]]: - """get an app - - Return an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppApp, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppApp, StderrErrResponse]]: - """get an app - - Return an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppApp, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_branch_app_configs.py b/nuon/api/apps/get_app_branch_app_configs.py deleted file mode 100644 index c604544b..00000000 --- a/nuon/api/apps/get_app_branch_app_configs.py +++ /dev/null @@ -1,258 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_config import AppAppConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - app_branch_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/branches/{app_branch_id}/configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppConfig.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - app_branch_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app branch app configs - - Args: - app_id (str): - app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_branch_id=app_branch_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - app_branch_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app branch app configs - - Args: - app_id (str): - app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppConfig']] - """ - - return sync_detailed( - app_id=app_id, - app_branch_id=app_branch_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - app_branch_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app branch app configs - - Args: - app_id (str): - app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_branch_id=app_branch_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - app_branch_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app branch app configs - - Args: - app_id (str): - app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppConfig']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - app_branch_id=app_branch_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_branches.py b/nuon/api/apps/get_app_branches.py deleted file mode 100644 index 74e79ba0..00000000 --- a/nuon/api/apps/get_app_branches.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_branch import AppAppBranch -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/branches", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppBranch.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: - """get app branches - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppBranch']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: - """get app branches - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppBranch']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: - """get app branches - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppBranch']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: - """get app branches - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppBranch']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_break_glass_config.py b/nuon/api/apps/get_app_break_glass_config.py deleted file mode 100644 index 8e79b418..00000000 --- a/nuon/api/apps/get_app_break_glass_config.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_break_glass_config import AppAppBreakGlassConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - break_glass_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/break-glass-configs/{break_glass_config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppBreakGlassConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - break_glass_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get app break_glass config - - Return an app break glass config by id. - - Args: - app_id (str): - break_glass_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - break_glass_config_id=break_glass_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - break_glass_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get app break_glass config - - Return an app break glass config by id. - - Args: - app_id (str): - break_glass_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - break_glass_config_id=break_glass_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - break_glass_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get app break_glass config - - Return an app break glass config by id. - - Args: - app_id (str): - break_glass_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - break_glass_config_id=break_glass_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - break_glass_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get app break_glass config - - Return an app break glass config by id. - - Args: - app_id (str): - break_glass_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - break_glass_config_id=break_glass_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_config.py b/nuon/api/apps/get_app_config.py deleted file mode 100644 index 238c0515..00000000 --- a/nuon/api/apps/get_app_config.py +++ /dev/null @@ -1,213 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_config import AppAppConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - app_config_id: str, - *, - recurse: Union[Unset, bool] = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["recurse"] = recurse - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/config/{app_config_id}", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """get an app config - - Fetch an app config by id. - - Args: - app_id (str): - app_config_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - recurse=recurse, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """get an app config - - Fetch an app config by id. - - Args: - app_id (str): - app_config_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - recurse=recurse, - ).parsed - - -async def asyncio_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """get an app config - - Fetch an app config by id. - - Args: - app_id (str): - app_config_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - recurse=recurse, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """get an app config - - Fetch an app config by id. - - Args: - app_id (str): - app_config_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - recurse=recurse, - ) - ).parsed diff --git a/nuon/api/apps/get_app_config_graph.py b/nuon/api/apps/get_app_config_graph.py deleted file mode 100644 index 5ae1791a..00000000 --- a/nuon/api/apps/get_app_config_graph.py +++ /dev/null @@ -1,202 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - app_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/config/{app_config_id}/graph", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 200: - response_200 = cast(str, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: - """get an app config graph - - Return raw graphviz data as a string that can be used to visualize a graph for an app. - - Note, for more complex viewing recommend to copy this output directly into [Graphviz - viewer](https://dreampuf.github.io/GraphvizOnline). - - Args: - app_id (str): - app_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: - """get an app config graph - - Return raw graphviz data as a string that can be used to visualize a graph for an app. - - Note, for more complex viewing recommend to copy this output directly into [Graphviz - viewer](https://dreampuf.github.io/GraphvizOnline). - - Args: - app_id (str): - app_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: - """get an app config graph - - Return raw graphviz data as a string that can be used to visualize a graph for an app. - - Note, for more complex viewing recommend to copy this output directly into [Graphviz - viewer](https://dreampuf.github.io/GraphvizOnline). - - Args: - app_id (str): - app_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: - """get an app config graph - - Return raw graphviz data as a string that can be used to visualize a graph for an app. - - Note, for more complex viewing recommend to copy this output directly into [Graphviz - viewer](https://dreampuf.github.io/GraphvizOnline). - - Args: - app_id (str): - app_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_config_template.py b/nuon/api/apps/get_app_config_template.py deleted file mode 100644 index c512cc6c..00000000 --- a/nuon/api/apps/get_app_config_template.py +++ /dev/null @@ -1,206 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_app_config_template_type import GetAppConfigTemplateType -from ...models.service_app_config_template import ServiceAppConfigTemplate -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response - - -def _get_kwargs( - app_id: str, - *, - type_: GetAppConfigTemplateType, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_type_ = type_.value - params["type"] = json_type_ - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/template-config", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: - if response.status_code == 201: - response_201 = ServiceAppConfigTemplate.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - type_: GetAppConfigTemplateType, -) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: - """get an app config template - - Create an application template which provides a fully rendered config that can be modified and used - to kickstart any application. - - Args: - app_id (str): - type_ (GetAppConfigTemplateType): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceAppConfigTemplate, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - type_=type_, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - type_: GetAppConfigTemplateType, -) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: - """get an app config template - - Create an application template which provides a fully rendered config that can be modified and used - to kickstart any application. - - Args: - app_id (str): - type_ (GetAppConfigTemplateType): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceAppConfigTemplate, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - type_=type_, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - type_: GetAppConfigTemplateType, -) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: - """get an app config template - - Create an application template which provides a fully rendered config that can be modified and used - to kickstart any application. - - Args: - app_id (str): - type_ (GetAppConfigTemplateType): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceAppConfigTemplate, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - type_=type_, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - type_: GetAppConfigTemplateType, -) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: - """get an app config template - - Create an application template which provides a fully rendered config that can be modified and used - to kickstart any application. - - Args: - app_id (str): - type_ (GetAppConfigTemplateType): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceAppConfigTemplate, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - type_=type_, - ) - ).parsed diff --git a/nuon/api/apps/get_app_configs.py b/nuon/api/apps/get_app_configs.py deleted file mode 100644 index 6821edcf..00000000 --- a/nuon/api/apps/get_app_configs.py +++ /dev/null @@ -1,253 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_config import AppAppConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppConfig.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app configs - - Returns all configs for the app. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app configs - - Returns all configs for the app. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppConfig']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app configs - - Returns all configs for the app. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: - """get app configs - - Returns all configs for the app. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppConfig']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_input_config.py b/nuon/api/apps/get_app_input_config.py deleted file mode 100644 index 2f1983e3..00000000 --- a/nuon/api/apps/get_app_input_config.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_input_config import AppAppInputConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - input_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/input-configs/{input_config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppInputConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - input_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - """get app input config - - Return an input config by id. - - Args: - app_id (str): - input_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - input_config_id=input_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - input_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - """get app input config - - Return an input config by id. - - Args: - app_id (str): - input_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppInputConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - input_config_id=input_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - input_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - """get app input config - - Return an input config by id. - - Args: - app_id (str): - input_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - input_config_id=input_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - input_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - """get app input config - - Return an input config by id. - - Args: - app_id (str): - input_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppInputConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - input_config_id=input_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_input_configs.py b/nuon/api/apps/get_app_input_configs.py deleted file mode 100644 index 09fc58fe..00000000 --- a/nuon/api/apps/get_app_input_configs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_input_config import AppAppInputConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/input-configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppInputConfig.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: - """get app input configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppInputConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: - """get app input configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppInputConfig']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: - """get app input configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppInputConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: - """get app input configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppInputConfig']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_input_latest_config.py b/nuon/api/apps/get_app_input_latest_config.py deleted file mode 100644 index 48bd7d5b..00000000 --- a/nuon/api/apps/get_app_input_latest_config.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_input_config import AppAppInputConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/input-latest-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppInputConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - """get latest app input config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - """get latest app input config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppInputConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: - """get latest app input config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: - """get latest app input config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppInputConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_latest_config.py b/nuon/api/apps/get_app_latest_config.py deleted file mode 100644 index 4c808e04..00000000 --- a/nuon/api/apps/get_app_latest_config.py +++ /dev/null @@ -1,200 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_config import AppAppConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - recurse: Union[Unset, bool] = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["recurse"] = recurse - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/latest-config", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """get latest app config - - Returns the most recent config for the provided app. - - Args: - app_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - recurse=recurse, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """get latest app config - - Returns the most recent config for the provided app. - - Args: - app_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - recurse=recurse, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """get latest app config - - Returns the most recent config for the provided app. - - Args: - app_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - recurse=recurse, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """get latest app config - - Returns the most recent config for the provided app. - - Args: - app_id (str): - recurse (Union[Unset, bool]): Default: False. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - recurse=recurse, - ) - ).parsed diff --git a/nuon/api/apps/get_app_permissions_config.py b/nuon/api/apps/get_app_permissions_config.py deleted file mode 100644 index bd60e37f..00000000 --- a/nuon/api/apps/get_app_permissions_config.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_permissions_config import AppAppPermissionsConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - permissions_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/permissions-configs/{permissions_config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppPermissionsConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - permissions_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get app permissions config - - Return an app permissions config by id. - - Args: - app_id (str): - permissions_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - permissions_config_id=permissions_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - permissions_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get app permissions config - - Return an app permissions config by id. - - Args: - app_id (str): - permissions_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - permissions_config_id=permissions_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - permissions_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get app permissions config - - Return an app permissions config by id. - - Args: - app_id (str): - permissions_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - permissions_config_id=permissions_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - permissions_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get app permissions config - - Return an app permissions config by id. - - Args: - app_id (str): - permissions_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - permissions_config_id=permissions_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_policies_config.py b/nuon/api/apps/get_app_policies_config.py deleted file mode 100644 index ae67f9b6..00000000 --- a/nuon/api/apps/get_app_policies_config.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_policies_config import AppAppPoliciesConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - policies_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/policies-configs/{policies_config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppPoliciesConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - policies_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get app policies config - - Return an app policy config by id. - - Args: - app_id (str): - policies_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - policies_config_id=policies_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - policies_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get app policies config - - Return an app policy config by id. - - Args: - app_id (str): - policies_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - policies_config_id=policies_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - policies_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get app policies config - - Return an app policy config by id. - - Args: - app_id (str): - policies_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - policies_config_id=policies_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - policies_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get app policies config - - Return an app policy config by id. - - Args: - app_id (str): - policies_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - policies_config_id=policies_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_runner_configs.py b/nuon/api/apps/get_app_runner_configs.py deleted file mode 100644 index 09ade96f..00000000 --- a/nuon/api/apps/get_app_runner_configs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_runner_config import AppAppRunnerConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/runner-configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppRunnerConfig.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: - """get app runner configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppRunnerConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: - """get app runner configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppRunnerConfig']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: - """get app runner configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppRunnerConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: - """get app runner configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppRunnerConfig']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_runner_latest_config.py b/nuon/api/apps/get_app_runner_latest_config.py deleted file mode 100644 index 10b13fb0..00000000 --- a/nuon/api/apps/get_app_runner_latest_config.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_runner_config import AppAppRunnerConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/runner-latest-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppRunnerConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: - """get latest app runner config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: - """get latest app runner config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppRunnerConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: - """get latest app runner config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: - """get latest app runner config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppRunnerConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_sandbox_configs.py b/nuon/api/apps/get_app_sandbox_configs.py deleted file mode 100644 index ebd13c2f..00000000 --- a/nuon/api/apps/get_app_sandbox_configs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_sandbox_config import AppAppSandboxConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/sandbox-configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppSandboxConfig.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: - """get app sandbox configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppSandboxConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: - """get app sandbox configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppSandboxConfig']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: - """get app sandbox configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppSandboxConfig']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: - """get app sandbox configs - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppSandboxConfig']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_sandbox_latest_config.py b/nuon/api/apps/get_app_sandbox_latest_config.py deleted file mode 100644 index 52e1db1c..00000000 --- a/nuon/api/apps/get_app_sandbox_latest_config.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_sandbox_config import AppAppSandboxConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/sandbox-latest-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppSandboxConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: - """get latest app sandbox config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: - """get latest app sandbox config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSandboxConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: - """get latest app sandbox config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: - """get latest app sandbox config - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSandboxConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_secrets.py b/nuon/api/apps/get_app_secrets.py deleted file mode 100644 index 0c57cc9f..00000000 --- a/nuon/api/apps/get_app_secrets.py +++ /dev/null @@ -1,261 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_secret import AppAppSecret -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/secrets", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppAppSecret.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: - """get app secrets - - List all secrets for an app. - - **NOTE** this does not return any sensitive values, as secrets are write only. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppSecret']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: - """get app secrets - - List all secrets for an app. - - **NOTE** this does not return any sensitive values, as secrets are write only. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppSecret']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: - """get app secrets - - List all secrets for an app. - - **NOTE** this does not return any sensitive values, as secrets are write only. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppAppSecret']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: - """get app secrets - - List all secrets for an app. - - **NOTE** this does not return any sensitive values, as secrets are write only. - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppAppSecret']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_app_secrets_config.py b/nuon/api/apps/get_app_secrets_config.py deleted file mode 100644 index 63dd6441..00000000 --- a/nuon/api/apps/get_app_secrets_config.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_secrets_config import AppAppSecretsConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - app_secrets_config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/secrets-configs/{app_secrets_config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppSecretsConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - app_secrets_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get app secrets config - - Return an app secrets config by id. - - Args: - app_id (str): - app_secrets_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_secrets_config_id=app_secrets_config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - app_secrets_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get app secrets config - - Return an app secrets config by id. - - Args: - app_id (str): - app_secrets_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecretsConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - app_secrets_config_id=app_secrets_config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - app_secrets_config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get app secrets config - - Return an app secrets config by id. - - Args: - app_id (str): - app_secrets_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_secrets_config_id=app_secrets_config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - app_secrets_config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get app secrets config - - Return an app secrets config by id. - - Args: - app_id (str): - app_secrets_config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecretsConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - app_secrets_config_id=app_secrets_config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_app_stack_config.py b/nuon/api/apps/get_app_stack_config.py deleted file mode 100644 index f0f1c315..00000000 --- a/nuon/api/apps/get_app_stack_config.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_stack_config import AppAppStackConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/stack-configs/{config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppStackConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: - """get app stack config - - Return a cloudformation stack config - - Args: - app_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - config_id=config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: - """get app stack config - - Return a cloudformation stack config - - Args: - app_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppStackConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - config_id=config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: - """get app stack config - - Return a cloudformation stack config - - Args: - app_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - config_id=config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: - """get app stack config - - Return a cloudformation stack config - - Args: - app_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppStackConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - config_id=config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_apps.py b/nuon/api/apps/get_apps.py deleted file mode 100644 index aa275ae5..00000000 --- a/nuon/api/apps/get_apps.py +++ /dev/null @@ -1,247 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app import AppApp -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["q"] = q - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/apps", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppApp.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppApp"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppApp"]]]: - """get all apps for the current org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppApp']]] - """ - - kwargs = _get_kwargs( - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: - """get all apps for the current org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppApp']] - """ - - return sync_detailed( - client=client, - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppApp"]]]: - """get all apps for the current org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppApp']]] - """ - - kwargs = _get_kwargs( - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: - """get all apps for the current org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppApp']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/apps/get_latest_app_break_glass_config.py b/nuon/api/apps/get_latest_app_break_glass_config.py deleted file mode 100644 index 4179dfd0..00000000 --- a/nuon/api/apps/get_latest_app_break_glass_config.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_break_glass_config import AppAppBreakGlassConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/latest-app-break-glass-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppBreakGlassConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config - - Get the latest break glass config for an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config - - Get the latest break glass config for an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config - - Get the latest break glass config for an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config - - Get the latest break glass config for an app. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_latest_app_permissions_config.py b/nuon/api/apps/get_latest_app_permissions_config.py deleted file mode 100644 index 3dcd61e0..00000000 --- a/nuon/api/apps/get_latest_app_permissions_config.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_permissions_config import AppAppPermissionsConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/latest-app-permissions-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppPermissionsConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get latest app permissions config - - Get the latest app permissions config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get latest app permissions config - - Get the latest app permissions config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get latest app permissions config - - Get the latest app permissions config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: - """get latest app permissions config - - Get the latest app permissions config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_latest_app_policies_config.py b/nuon/api/apps/get_latest_app_policies_config.py deleted file mode 100644 index ace2571b..00000000 --- a/nuon/api/apps/get_latest_app_policies_config.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_policies_config import AppAppPoliciesConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/latest-app-policies-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppPoliciesConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get latest app policies config - - Get latest app policies config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get latest app policies config - - Get latest app policies config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get latest app policies config - - Get latest app policies config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: - """get latest app policies config - - Get latest app policies config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/get_latest_app_secrets_config.py b/nuon/api/apps/get_latest_app_secrets_config.py deleted file mode 100644 index 49ac7897..00000000 --- a/nuon/api/apps/get_latest_app_secrets_config.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_secrets_config import AppAppSecretsConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/latest-app-secrets-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAppSecretsConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get latest app secrets config - - Get the latest app secrets config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get latest app secrets config - - Get the latest app secrets config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecretsConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get latest app secrets config - - Get the latest app secrets config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: - """get latest app secrets config - - Get the latest app secrets config. - - Args: - app_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppSecretsConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - ) - ).parsed diff --git a/nuon/api/apps/update_app.py b/nuon/api/apps/update_app.py deleted file mode 100644 index c86fa855..00000000 --- a/nuon/api/apps/update_app.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app import AppApp -from ...models.service_update_app_request import ServiceUpdateAppRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceUpdateAppRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/apps/{app_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppApp, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppApp.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppApp, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: - """update an app - - Args: - app_id (str): - body (ServiceUpdateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppApp, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: - """update an app - - Args: - app_id (str): - body (ServiceUpdateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppApp, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: - """update an app - - Args: - app_id (str): - body (ServiceUpdateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppApp, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: - """update an app - - Args: - app_id (str): - body (ServiceUpdateAppRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppApp, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/update_app_config.py b/nuon/api/apps/update_app_config.py deleted file mode 100644 index b0656c1a..00000000 --- a/nuon/api/apps/update_app_config.py +++ /dev/null @@ -1,206 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_app_config import AppAppConfig -from ...models.service_update_app_config_request import ServiceUpdateAppConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - app_config_id: str, - *, - body: ServiceUpdateAppConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/apps/{app_id}/config/{app_config_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAppConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """Update an app config, setting status and state. - - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """Update an app config, setting status and state. - - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: - """Update an app config, setting status and state. - - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAppConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: - """Update an app config, setting status and state. - - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAppConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/apps/update_app_config_installs.py b/nuon/api/apps/update_app_config_installs.py deleted file mode 100644 index 2a245d8f..00000000 --- a/nuon/api/apps/update_app_config_installs.py +++ /dev/null @@ -1,200 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_update_app_config_installs_request import ServiceUpdateAppConfigInstallsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - app_config_id: str, - *, - body: ServiceUpdateAppConfigInstallsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/config/{app_config_id}/update-installs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 200: - response_200 = cast(str, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigInstallsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """ - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigInstallsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigInstallsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """ - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigInstallsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigInstallsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """ - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigInstallsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - app_config_id=app_config_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - app_config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateAppConfigInstallsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """ - Args: - app_id (str): - app_config_id (str): - body (ServiceUpdateAppConfigInstallsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - app_config_id=app_config_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/__init__.py b/nuon/api/components/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/components/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/components/create_component.py b/nuon/api/components/create_component.py deleted file mode 100644 index 86c12e3d..00000000 --- a/nuon/api/components/create_component.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.service_create_component_request import ServiceCreateComponentRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateComponentRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/components", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppComponent.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """create a component - - Args: - app_id (str): - body (ServiceCreateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """create a component - - Args: - app_id (str): - body (ServiceCreateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """create a component - - Args: - app_id (str): - body (ServiceCreateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """create a component - - Args: - app_id (str): - body (ServiceCreateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_component_build.py b/nuon/api/components/create_component_build.py deleted file mode 100644 index 73661cf0..00000000 --- a/nuon/api/components/create_component_build.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_build import AppComponentBuild -from ...models.service_create_component_build_request import ServiceCreateComponentBuildRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateComponentBuildRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/builds", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppComponentBuild.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentBuildRequest, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """create component build - - Args: - component_id (str): - body (ServiceCreateComponentBuildRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentBuildRequest, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """create component build - - Args: - component_id (str): - body (ServiceCreateComponentBuildRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentBuildRequest, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """create component build - - Args: - component_id (str): - body (ServiceCreateComponentBuildRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentBuildRequest, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """create component build - - Args: - component_id (str): - body (ServiceCreateComponentBuildRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_docker_build_component_config.py b/nuon/api/components/create_docker_build_component_config.py deleted file mode 100644 index 28030383..00000000 --- a/nuon/api/components/create_docker_build_component_config.py +++ /dev/null @@ -1,195 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_docker_build_component_config import AppDockerBuildComponentConfig -from ...models.service_create_docker_build_component_config_request import ( - ServiceCreateDockerBuildComponentConfigRequest, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateDockerBuildComponentConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/configs/docker-build", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppDockerBuildComponentConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: - """create a docker build component config - - Args: - component_id (str): - body (ServiceCreateDockerBuildComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: - """create a docker build component config - - Args: - component_id (str): - body (ServiceCreateDockerBuildComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppDockerBuildComponentConfig, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: - """create a docker build component config - - Args: - component_id (str): - body (ServiceCreateDockerBuildComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: - """create a docker build component config - - Args: - component_id (str): - body (ServiceCreateDockerBuildComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppDockerBuildComponentConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_external_image_component_config.py b/nuon/api/components/create_external_image_component_config.py deleted file mode 100644 index 7fc500d1..00000000 --- a/nuon/api/components/create_external_image_component_config.py +++ /dev/null @@ -1,195 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_external_image_component_config import AppExternalImageComponentConfig -from ...models.service_create_external_image_component_config_request import ( - ServiceCreateExternalImageComponentConfigRequest, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateExternalImageComponentConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/configs/external-image", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppExternalImageComponentConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateExternalImageComponentConfigRequest, -) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: - """create an external image component config - - Args: - component_id (str): - body (ServiceCreateExternalImageComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppExternalImageComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateExternalImageComponentConfigRequest, -) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: - """create an external image component config - - Args: - component_id (str): - body (ServiceCreateExternalImageComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppExternalImageComponentConfig, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateExternalImageComponentConfigRequest, -) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: - """create an external image component config - - Args: - component_id (str): - body (ServiceCreateExternalImageComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppExternalImageComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateExternalImageComponentConfigRequest, -) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: - """create an external image component config - - Args: - component_id (str): - body (ServiceCreateExternalImageComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppExternalImageComponentConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_helm_component_config.py b/nuon/api/components/create_helm_component_config.py deleted file mode 100644 index 28ff8ea2..00000000 --- a/nuon/api/components/create_helm_component_config.py +++ /dev/null @@ -1,201 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_helm_component_config import AppHelmComponentConfig -from ...models.service_create_helm_component_config_request import ServiceCreateHelmComponentConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateHelmComponentConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/configs/helm", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppHelmComponentConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateHelmComponentConfigRequest, -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: - """create a helm component config - - Create a helm component config. - - Args: - component_id (str): - body (ServiceCreateHelmComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppHelmComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateHelmComponentConfigRequest, -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: - """create a helm component config - - Create a helm component config. - - Args: - component_id (str): - body (ServiceCreateHelmComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppHelmComponentConfig, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateHelmComponentConfigRequest, -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: - """create a helm component config - - Create a helm component config. - - Args: - component_id (str): - body (ServiceCreateHelmComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppHelmComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateHelmComponentConfigRequest, -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: - """create a helm component config - - Create a helm component config. - - Args: - component_id (str): - body (ServiceCreateHelmComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppHelmComponentConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_job_component_config.py b/nuon/api/components/create_job_component_config.py deleted file mode 100644 index db32eab2..00000000 --- a/nuon/api/components/create_job_component_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_job_component_config import AppJobComponentConfig -from ...models.service_create_job_component_config_request import ServiceCreateJobComponentConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateJobComponentConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/configs/job", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppJobComponentConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateJobComponentConfigRequest, -) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: - """create a job component config - - Args: - component_id (str): - body (ServiceCreateJobComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppJobComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateJobComponentConfigRequest, -) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: - """create a job component config - - Args: - component_id (str): - body (ServiceCreateJobComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppJobComponentConfig, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateJobComponentConfigRequest, -) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: - """create a job component config - - Args: - component_id (str): - body (ServiceCreateJobComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppJobComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateJobComponentConfigRequest, -) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: - """create a job component config - - Args: - component_id (str): - body (ServiceCreateJobComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppJobComponentConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_kubernetes_manifest_component_config.py b/nuon/api/components/create_kubernetes_manifest_component_config.py deleted file mode 100644 index 5ae46a12..00000000 --- a/nuon/api/components/create_kubernetes_manifest_component_config.py +++ /dev/null @@ -1,195 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig -from ...models.service_create_kubernetes_manifest_component_config_request import ( - ServiceCreateKubernetesManifestComponentConfigRequest, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/configs/kubernetes-manifest", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppKubernetesManifestComponentConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: - """create a kubernetes manifest component config - - Args: - component_id (str): - body (ServiceCreateKubernetesManifestComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: - """create a kubernetes manifest component config - - Args: - component_id (str): - body (ServiceCreateKubernetesManifestComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppKubernetesManifestComponentConfig, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: - """create a kubernetes manifest component config - - Args: - component_id (str): - body (ServiceCreateKubernetesManifestComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: - """create a kubernetes manifest component config - - Args: - component_id (str): - body (ServiceCreateKubernetesManifestComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppKubernetesManifestComponentConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/create_terraform_module_component_config.py b/nuon/api/components/create_terraform_module_component_config.py deleted file mode 100644 index 7953122c..00000000 --- a/nuon/api/components/create_terraform_module_component_config.py +++ /dev/null @@ -1,203 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_module_component_config import AppTerraformModuleComponentConfig -from ...models.service_create_terraform_module_component_config_request import ( - ServiceCreateTerraformModuleComponentConfigRequest, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/configs/terraform-module", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppTerraformModuleComponentConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: - """create a terraform component config - - Create a terraform component config. - - Args: - component_id (str): - body (ServiceCreateTerraformModuleComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: - """create a terraform component config - - Create a terraform component config. - - Args: - component_id (str): - body (ServiceCreateTerraformModuleComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformModuleComponentConfig, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: - """create a terraform component config - - Create a terraform component config. - - Args: - component_id (str): - body (ServiceCreateTerraformModuleComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: - """create a terraform component config - - Create a terraform component config. - - Args: - component_id (str): - body (ServiceCreateTerraformModuleComponentConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformModuleComponentConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/components/delete_component.py b/nuon/api/components/delete_component.py deleted file mode 100644 index 814015cd..00000000 --- a/nuon/api/components/delete_component.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/components/{component_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_app_component.py b/nuon/api/components/get_app_component.py deleted file mode 100644 index 80b0a5aa..00000000 --- a/nuon/api/components/get_app_component.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - component_name_or_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/component/{component_name_or_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponent.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - component_name_or_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """get a components for a specific app - - Return an app component by id or name. - - Args: - app_id (str): - component_name_or_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - component_name_or_id=component_name_or_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - component_name_or_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """get a components for a specific app - - Return an app component by id or name. - - Args: - app_id (str): - component_name_or_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - component_name_or_id=component_name_or_id, - client=client, - ).parsed - - -async def asyncio_detailed( - app_id: str, - component_name_or_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """get a components for a specific app - - Return an app component by id or name. - - Args: - app_id (str): - component_name_or_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - component_name_or_id=component_name_or_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - component_name_or_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """get a components for a specific app - - Return an app component by id or name. - - Args: - app_id (str): - component_name_or_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - component_name_or_id=component_name_or_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_app_components.py b/nuon/api/components/get_app_components.py deleted file mode 100644 index 8f1bd222..00000000 --- a/nuon/api/components/get_app_components.py +++ /dev/null @@ -1,275 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - q: Union[Unset, str] = UNSET, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["q"] = q - - params["types"] = types - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/components", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponent.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an app - - Args: - app_id (str): - q (Union[Unset, str]): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - q=q, - types=types, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an app - - Args: - app_id (str): - q (Union[Unset, str]): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponent']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - q=q, - types=types, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an app - - Args: - app_id (str): - q (Union[Unset, str]): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - q=q, - types=types, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an app - - Args: - app_id (str): - q (Union[Unset, str]): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponent']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - q=q, - types=types, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/components/get_build.py b/nuon/api/components/get_build.py deleted file mode 100644 index 3cc314dc..00000000 --- a/nuon/api/components/get_build.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_build import AppComponentBuild -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - build_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/builds/{build_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponentBuild.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - build_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """get a build - - Returns builds for one or all components in an app. - - Args: - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - build_id=build_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - build_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """get a build - - Returns builds for one or all components in an app. - - Args: - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return sync_detailed( - build_id=build_id, - client=client, - ).parsed - - -async def asyncio_detailed( - build_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """get a build - - Returns builds for one or all components in an app. - - Args: - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - build_id=build_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - build_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """get a build - - Returns builds for one or all components in an app. - - Args: - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - build_id=build_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component.py b/nuon/api/components/get_component.py deleted file mode 100644 index db82cb83..00000000 --- a/nuon/api/components/get_component.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponent.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """get a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """get a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """get a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """get a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component_build.py b/nuon/api/components/get_component_build.py deleted file mode 100644 index 592e9cf8..00000000 --- a/nuon/api/components/get_component_build.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_build import AppComponentBuild -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - build_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/builds/{build_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponentBuild.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - build_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """get a build for a component - - Returns builds for one or all components in an app. - - Args: - component_id (str): - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - build_id=build_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - build_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """get a build for a component - - Returns builds for one or all components in an app. - - Args: - component_id (str): - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - build_id=build_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - build_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """get a build for a component - - Returns builds for one or all components in an app. - - Args: - component_id (str): - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - build_id=build_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - build_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """get a build for a component - - Returns builds for one or all components in an app. - - Args: - component_id (str): - build_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - build_id=build_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component_builds.py b/nuon/api/components/get_component_builds.py deleted file mode 100644 index 137e7485..00000000 --- a/nuon/api/components/get_component_builds.py +++ /dev/null @@ -1,262 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_build import AppComponentBuild -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["component_id"] = component_id - - params["app_id"] = app_id - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/builds", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponentBuild.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: - """get builds for components - - Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentBuild']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: - """get builds for components - - Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentBuild']] - """ - - return sync_detailed( - client=client, - component_id=component_id, - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: - """get builds for components - - Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentBuild']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: - """get builds for components - - Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentBuild']] - """ - - return ( - await asyncio_detailed( - client=client, - component_id=component_id, - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/components/get_component_config.py b/nuon/api/components/get_component_config.py deleted file mode 100644 index 18936383..00000000 --- a/nuon/api/components/get_component_config.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_config_connection import AppComponentConfigConnection -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - config_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/configs/{config_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponentConfigConnection.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component - - Args: - component_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - config_id=config_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component - - Args: - component_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentConfigConnection, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - config_id=config_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component - - Args: - component_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - config_id=config_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - config_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component - - Args: - component_id (str): - config_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentConfigConnection, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - config_id=config_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component_configs.py b/nuon/api/components/get_component_configs.py deleted file mode 100644 index 16b4f1a7..00000000 --- a/nuon/api/components/get_component_configs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_config_connection import AppComponentConfigConnection -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - component_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/configs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponentConfigConnection.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: - """get all configs for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: - """get all configs for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentConfigConnection']] - """ - - return sync_detailed( - component_id=component_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: - """get all configs for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: - """get all configs for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentConfigConnection']] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/components/get_component_dependencies.py b/nuon/api/components/get_component_dependencies.py deleted file mode 100644 index 385846ff..00000000 --- a/nuon/api/components/get_component_dependencies.py +++ /dev/null @@ -1,176 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/dependencies", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponent.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - """get a component's dependencies - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - """get a component's dependencies - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponent']] - """ - - return sync_detailed( - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - """get a component's dependencies - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - """get a component's dependencies - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponent']] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component_dependents.py b/nuon/api/components/get_component_dependents.py deleted file mode 100644 index b334df5e..00000000 --- a/nuon/api/components/get_component_dependents.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_component_children import ServiceComponentChildren -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/dependents", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: - if response.status_code == 200: - response_200 = ServiceComponentChildren.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: - """get a component's children - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceComponentChildren, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: - """get a component's children - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceComponentChildren, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: - """get a component's children - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceComponentChildren, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: - """get a component's children - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceComponentChildren, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component_latest_build.py b/nuon/api/components/get_component_latest_build.py deleted file mode 100644 index a4c515ed..00000000 --- a/nuon/api/components/get_component_latest_build.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_build import AppComponentBuild -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/builds/latest", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponentBuild.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """get latest build for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """get latest build for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: - """get latest build for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: - """get latest build for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentBuild, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_component_latest_config.py b/nuon/api/components/get_component_latest_config.py deleted file mode 100644 index 5288f255..00000000 --- a/nuon/api/components/get_component_latest_config.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_config_connection import AppComponentConfigConnection -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/configs/latest", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponentConfigConnection.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get latest config for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get latest config for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentConfigConnection, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get latest config for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get latest config for a component - - Args: - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentConfigConnection, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/components/get_org_components.py b/nuon/api/components/get_org_components.py deleted file mode 100644 index 84ed48cf..00000000 --- a/nuon/api/components/get_org_components.py +++ /dev/null @@ -1,232 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/components", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponent.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponent']] - """ - - return sync_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: - """get all components for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponent']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/components/update_component.py b/nuon/api/components/update_component.py deleted file mode 100644 index 2fe7c69a..00000000 --- a/nuon/api/components/update_component.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component import AppComponent -from ...models.service_update_component_request import ServiceUpdateComponentRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceUpdateComponentRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/components/{component_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponent.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """update a component - - Args: - component_id (str): - body (ServiceUpdateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """update a component - - Args: - component_id (str): - body (ServiceUpdateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: - """update a component - - Args: - component_id (str): - body (ServiceUpdateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: - """update a component - - Args: - component_id (str): - body (ServiceUpdateComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponent, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/general/__init__.py b/nuon/api/general/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/general/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/general/create_waitlist.py b/nuon/api/general/create_waitlist.py deleted file mode 100644 index d8fca277..00000000 --- a/nuon/api/general/create_waitlist.py +++ /dev/null @@ -1,155 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_waitlist import AppWaitlist -from ...models.service_waitlist_request import ServiceWaitlistRequest -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceWaitlistRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/general/waitlist", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[AppWaitlist]: - if response.status_code == 200: - response_200 = AppWaitlist.from_dict(response.json()) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[AppWaitlist]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceWaitlistRequest, -) -> Response[AppWaitlist]: - """Allow user to be added to an org waitlist. - - Args: - body (ServiceWaitlistRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[AppWaitlist] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceWaitlistRequest, -) -> Optional[AppWaitlist]: - """Allow user to be added to an org waitlist. - - Args: - body (ServiceWaitlistRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - AppWaitlist - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceWaitlistRequest, -) -> Response[AppWaitlist]: - """Allow user to be added to an org waitlist. - - Args: - body (ServiceWaitlistRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[AppWaitlist] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceWaitlistRequest, -) -> Optional[AppWaitlist]: - """Allow user to be added to an org waitlist. - - Args: - body (ServiceWaitlistRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - AppWaitlist - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/general/get_cli_config.py b/nuon/api/general/get_cli_config.py deleted file mode 100644 index 1f6083c4..00000000 --- a/nuon/api/general/get_cli_config.py +++ /dev/null @@ -1,147 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_cli_config import ServiceCLIConfig -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/general/cli-config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: - if response.status_code == 200: - response_200 = ServiceCLIConfig.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: - """Get config for cli - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceCLIConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: - """Get config for cli - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceCLIConfig, StderrErrResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: - """Get config for cli - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceCLIConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: - """Get config for cli - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceCLIConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/general/get_cloud_platform_regions.py b/nuon/api/general/get_cloud_platform_regions.py deleted file mode 100644 index 3d37ba95..00000000 --- a/nuon/api/general/get_cloud_platform_regions.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_cloud_platform_region import AppCloudPlatformRegion -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - cloud_platform: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/general/cloud-platform/{cloud_platform}/regions", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppCloudPlatformRegion.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - cloud_platform: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: - """Get regions for a cloud platform - - Return region metadata for the Nuon supported cloud platforms. - - Args: - cloud_platform (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppCloudPlatformRegion']]] - """ - - kwargs = _get_kwargs( - cloud_platform=cloud_platform, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - cloud_platform: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: - """Get regions for a cloud platform - - Return region metadata for the Nuon supported cloud platforms. - - Args: - cloud_platform (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppCloudPlatformRegion']] - """ - - return sync_detailed( - cloud_platform=cloud_platform, - client=client, - ).parsed - - -async def asyncio_detailed( - cloud_platform: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: - """Get regions for a cloud platform - - Return region metadata for the Nuon supported cloud platforms. - - Args: - cloud_platform (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppCloudPlatformRegion']]] - """ - - kwargs = _get_kwargs( - cloud_platform=cloud_platform, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - cloud_platform: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: - """Get regions for a cloud platform - - Return region metadata for the Nuon supported cloud platforms. - - Args: - cloud_platform (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppCloudPlatformRegion']] - """ - - return ( - await asyncio_detailed( - cloud_platform=cloud_platform, - client=client, - ) - ).parsed diff --git a/nuon/api/general/get_config_schema.py b/nuon/api/general/get_config_schema.py deleted file mode 100644 index 80485829..00000000 --- a/nuon/api/general/get_config_schema.py +++ /dev/null @@ -1,271 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_config_schema_response_200 import GetConfigSchemaResponse200 -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - type_: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["type"] = type_ - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/general/config-schema", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: - if response.status_code == 200: - response_200 = GetConfigSchemaResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: - r"""Get jsonschema for config file - - Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a - TOML LSP (such as - [Taplo](https://taplo.tamasfe.dev/) configured. - - ```toml - #:schema https://api.nuon.co/v1/general/config-schema?source=inputs - - description = \"description\" - ``` - - You can pass in a valid source argument to render within a specific config file: - - - input - - input-group - - installer - - sandbox - - runner - - docker_build - - container_image - - helm - - terraform - - job - - Args: - type_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetConfigSchemaResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - type_=type_, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: - r"""Get jsonschema for config file - - Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a - TOML LSP (such as - [Taplo](https://taplo.tamasfe.dev/) configured. - - ```toml - #:schema https://api.nuon.co/v1/general/config-schema?source=inputs - - description = \"description\" - ``` - - You can pass in a valid source argument to render within a specific config file: - - - input - - input-group - - installer - - sandbox - - runner - - docker_build - - container_image - - helm - - terraform - - job - - Args: - type_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetConfigSchemaResponse200, StderrErrResponse] - """ - - return sync_detailed( - client=client, - type_=type_, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: - r"""Get jsonschema for config file - - Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a - TOML LSP (such as - [Taplo](https://taplo.tamasfe.dev/) configured. - - ```toml - #:schema https://api.nuon.co/v1/general/config-schema?source=inputs - - description = \"description\" - ``` - - You can pass in a valid source argument to render within a specific config file: - - - input - - input-group - - installer - - sandbox - - runner - - docker_build - - container_image - - helm - - terraform - - job - - Args: - type_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetConfigSchemaResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - type_=type_, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: - r"""Get jsonschema for config file - - Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a - TOML LSP (such as - [Taplo](https://taplo.tamasfe.dev/) configured. - - ```toml - #:schema https://api.nuon.co/v1/general/config-schema?source=inputs - - description = \"description\" - ``` - - You can pass in a valid source argument to render within a specific config file: - - - input - - input-group - - installer - - sandbox - - runner - - docker_build - - container_image - - helm - - terraform - - job - - Args: - type_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetConfigSchemaResponse200, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - type_=type_, - ) - ).parsed diff --git a/nuon/api/general/get_current_user.py b/nuon/api/general/get_current_user.py deleted file mode 100644 index b88806ce..00000000 --- a/nuon/api/general/get_current_user.py +++ /dev/null @@ -1,147 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_account import AppAccount -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/general/current-user", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAccount.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Get current user - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Get current user - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Get current user - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Get current user - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/installers/__init__.py b/nuon/api/installers/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/installers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/installers/create_installer.py b/nuon/api/installers/create_installer.py deleted file mode 100644 index 4142f89e..00000000 --- a/nuon/api/installers/create_installer.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_installer import AppInstaller -from ...models.service_create_installer_request import ServiceCreateInstallerRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateInstallerRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/installers", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstaller.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstaller, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: - """create an installer - - Args: - body (ServiceCreateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - """create an installer - - Args: - body (ServiceCreateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstaller, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: - """create an installer - - Args: - body (ServiceCreateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - """create an installer - - Args: - body (ServiceCreateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstaller, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installers/delete_installer.py b/nuon/api/installers/delete_installer.py deleted file mode 100644 index 2599263d..00000000 --- a/nuon/api/installers/delete_installer.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - installer_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/installers/{installer_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - installer_id=installer_id, - client=client, - ).parsed - - -async def asyncio_detailed( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - installer_id=installer_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installers/get_installer.py b/nuon/api/installers/get_installer.py deleted file mode 100644 index 37330757..00000000 --- a/nuon/api/installers/get_installer.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_installer import AppInstaller -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - installer_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installers/{installer_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstaller.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstaller, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstaller, StderrErrResponse]]: - """get an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - """get an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstaller, StderrErrResponse] - """ - - return sync_detailed( - installer_id=installer_id, - client=client, - ).parsed - - -async def asyncio_detailed( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstaller, StderrErrResponse]]: - """get an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - installer_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - """get an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstaller, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - installer_id=installer_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installers/get_installers.py b/nuon/api/installers/get_installers.py deleted file mode 100644 index 5e71c543..00000000 --- a/nuon/api/installers/get_installers.py +++ /dev/null @@ -1,240 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_installer import AppInstaller -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/installers", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstaller.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: - """get installers for current org - - Return all installers for the current org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstaller']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: - """get installers for current org - - Return all installers for the current org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstaller']] - """ - - return sync_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: - """get installers for current org - - Return all installers for the current org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstaller']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: - """get installers for current org - - Return all installers for the current org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstaller']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installers/render_installer.py b/nuon/api/installers/render_installer.py deleted file mode 100644 index 9c03a533..00000000 --- a/nuon/api/installers/render_installer.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_rendered_installer import ServiceRenderedInstaller -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - installer_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installer/{installer_id}/render", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: - if response.status_code == 200: - response_200 = ServiceRenderedInstaller.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - installer_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: - """render an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRenderedInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - installer_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: - """render an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRenderedInstaller, StderrErrResponse] - """ - - return sync_detailed( - installer_id=installer_id, - client=client, - ).parsed - - -async def asyncio_detailed( - installer_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: - """render an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRenderedInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - installer_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: - """render an installer - - Args: - installer_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRenderedInstaller, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - installer_id=installer_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installers/update_installer.py b/nuon/api/installers/update_installer.py deleted file mode 100644 index 456bf056..00000000 --- a/nuon/api/installers/update_installer.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_installer import AppInstaller -from ...models.service_update_installer_request import ServiceUpdateInstallerRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - installer_id: str, - *, - body: ServiceUpdateInstallerRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/installers/{installer_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstaller.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstaller, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - installer_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: - """update an installer - - Args: - installer_id (str): - body (ServiceUpdateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - installer_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - """update an installer - - Args: - installer_id (str): - body (ServiceUpdateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstaller, StderrErrResponse] - """ - - return sync_detailed( - installer_id=installer_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - installer_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: - """update an installer - - Args: - installer_id (str): - body (ServiceUpdateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstaller, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - installer_id=installer_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - installer_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: - """update an installer - - Args: - installer_id (str): - body (ServiceUpdateInstallerRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstaller, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - installer_id=installer_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/__init__.py b/nuon/api/installs/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/installs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/installs/cancel_install_workflow.py b/nuon/api/installs/cancel_install_workflow.py deleted file mode 100644 index 9b01f25d..00000000 --- a/nuon/api/installs/cancel_install_workflow.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/install-workflows/{install_workflow_id}/cancel", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 202: - response_202 = cast(bool, response.json()) - return response_202 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """cancel an ongoing install workflow - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """cancel an ongoing install workflow - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """cancel an ongoing install workflow - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """cancel an ongoing install workflow - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/cancel_workflow.py b/nuon/api/installs/cancel_workflow.py deleted file mode 100644 index a5c4ff92..00000000 --- a/nuon/api/installs/cancel_workflow.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/workflows/{workflow_id}/cancel", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 202: - response_202 = cast(bool, response.json()) - return response_202 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """cancel an ongoing workflow - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """cancel an ongoing workflow - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - workflow_id=workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """cancel an ongoing workflow - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """cancel an ongoing workflow - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/create_install.py b/nuon/api/installs/create_install.py deleted file mode 100644 index a3d8d66e..00000000 --- a/nuon/api/installs/create_install.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install import AppInstall -from ...models.service_create_install_request import ServiceCreateInstallRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - app_id: str, - *, - body: ServiceCreateInstallRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/apps/{app_id}/installs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstall, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstall.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstall, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: - """create an app install - - Args: - app_id (str): - body (ServiceCreateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstall, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: - """create an app install - - Args: - app_id (str): - body (ServiceCreateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstall, StderrErrResponse] - """ - - return sync_detailed( - app_id=app_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: - """create an app install - - Args: - app_id (str): - body (ServiceCreateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstall, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: - """create an app install - - Args: - app_id (str): - body (ServiceCreateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstall, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/create_install_config.py b/nuon/api/installs/create_install_config.py deleted file mode 100644 index 43358269..00000000 --- a/nuon/api/installs/create_install_config.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_config import AppInstallConfig -from ...models.service_create_install_config_request import ServiceCreateInstallConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceCreateInstallConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/configs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstallConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - body (ServiceCreateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - body (ServiceCreateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallConfig, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - body (ServiceCreateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - body (ServiceCreateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/create_install_deploy.py b/nuon/api/installs/create_install_deploy.py deleted file mode 100644 index e595c1a0..00000000 --- a/nuon/api/installs/create_install_deploy.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_deploy import AppInstallDeploy -from ...models.service_create_install_deploy_request import ServiceCreateInstallDeployRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceCreateInstallDeployRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/deploys", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstallDeploy.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallDeployRequest, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_id (str): - body (ServiceCreateInstallDeployRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallDeployRequest, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_id (str): - body (ServiceCreateInstallDeployRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallDeployRequest, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_id (str): - body (ServiceCreateInstallDeployRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallDeployRequest, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_id (str): - body (ServiceCreateInstallDeployRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/create_install_inputs.py b/nuon/api/installs/create_install_inputs.py deleted file mode 100644 index 112c32e8..00000000 --- a/nuon/api/installs/create_install_inputs.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_inputs import AppInstallInputs -from ...models.service_create_install_inputs_request import ServiceCreateInstallInputsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceCreateInstallInputsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/inputs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstallInputs.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - """create install inputs - - Args: - install_id (str): - body (ServiceCreateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - """create install inputs - - Args: - install_id (str): - body (ServiceCreateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallInputs, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - """create install inputs - - Args: - install_id (str): - body (ServiceCreateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - """create install inputs - - Args: - install_id (str): - body (ServiceCreateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallInputs, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/create_install_workflow_step_approval_response.py b/nuon/api/installs/create_install_workflow_step_approval_response.py deleted file mode 100644 index ce01f5b9..00000000 --- a/nuon/api/installs/create_install_workflow_step_approval_response.py +++ /dev/null @@ -1,221 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse -from ...models.service_create_workflow_step_approval_response_request import ( - ServiceCreateWorkflowStepApprovalResponseRequest, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/install-workflows/{install_workflow_id}/steps/{install_workflow_step_id}/approvals/{approval_id}/response", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppWorkflowStepApprovalResponse.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/create_workflow_step_approval_response.py b/nuon/api/installs/create_workflow_step_approval_response.py deleted file mode 100644 index 45b08899..00000000 --- a/nuon/api/installs/create_workflow_step_approval_response.py +++ /dev/null @@ -1,221 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse -from ...models.service_create_workflow_step_approval_response_request import ( - ServiceCreateWorkflowStepApprovalResponseRequest, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}/response", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppWorkflowStepApprovalResponse.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] - """ - - return sync_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/delete_install.py b/nuon/api/installs/delete_install.py deleted file mode 100644 index f740da9c..00000000 --- a/nuon/api/installs/delete_install.py +++ /dev/null @@ -1,169 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/installs/{install_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an install - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an install - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """delete an install - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """delete an install - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/deploy_install_components.py b/nuon/api/installs/deploy_install_components.py deleted file mode 100644 index 018fb2aa..00000000 --- a/nuon/api/installs/deploy_install_components.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_deploy_install_components_request import ServiceDeployInstallComponentsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceDeployInstallComponentsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/components/deploy-all", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeployInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """deploy all components on an install - - Deploy all components to an install. - - This walks the graph order of the install's app, and will trigger a deploy for each on the specified - install. - - Args: - install_id (str): - body (ServiceDeployInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeployInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """deploy all components on an install - - Deploy all components to an install. - - This walks the graph order of the install's app, and will trigger a deploy for each on the specified - install. - - Args: - install_id (str): - body (ServiceDeployInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeployInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """deploy all components on an install - - Deploy all components to an install. - - This walks the graph order of the install's app, and will trigger a deploy for each on the specified - install. - - Args: - install_id (str): - body (ServiceDeployInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeployInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """deploy all components on an install - - Deploy all components to an install. - - This walks the graph order of the install's app, and will trigger a deploy for each on the specified - install. - - Args: - install_id (str): - body (ServiceDeployInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/deprovision_install.py b/nuon/api/installs/deprovision_install.py deleted file mode 100644 index b72ee735..00000000 --- a/nuon/api/installs/deprovision_install.py +++ /dev/null @@ -1,199 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_deprovision_install_request import ServiceDeprovisionInstallRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceDeprovisionInstallRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/deprovision", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: - """deprovision an install - - Deprovision an install sandbox. - - Args: - install_id (str): - body (ServiceDeprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """deprovision an install - - Deprovision an install sandbox. - - Args: - install_id (str): - body (ServiceDeprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: - """deprovision an install - - Deprovision an install sandbox. - - Args: - install_id (str): - body (ServiceDeprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """deprovision an install - - Deprovision an install sandbox. - - Args: - install_id (str): - body (ServiceDeprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/deprovision_install_sandbox.py b/nuon/api/installs/deprovision_install_sandbox.py deleted file mode 100644 index 7c452297..00000000 --- a/nuon/api/installs/deprovision_install_sandbox.py +++ /dev/null @@ -1,191 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_deprovision_install_sandbox_request import ServiceDeprovisionInstallSandboxRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceDeprovisionInstallSandboxRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/deprovision-sandbox", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: - """deprovision an install - - Args: - install_id (str): - body (ServiceDeprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """deprovision an install - - Args: - install_id (str): - body (ServiceDeprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: - """deprovision an install - - Args: - install_id (str): - body (ServiceDeprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceDeprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """deprovision an install - - Args: - install_id (str): - body (ServiceDeprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/forget_install.py b/nuon/api/installs/forget_install.py deleted file mode 100644 index ef7ec65f..00000000 --- a/nuon/api/installs/forget_install.py +++ /dev/null @@ -1,203 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_forget_install_request import ServiceForgetInstallRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceForgetInstallRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/forget", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceForgetInstallRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """forget an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - body (ServiceForgetInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceForgetInstallRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """forget an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - body (ServiceForgetInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceForgetInstallRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """forget an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - body (ServiceForgetInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceForgetInstallRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """forget an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - body (ServiceForgetInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/get_app_installs.py b/nuon/api/installs/get_app_installs.py deleted file mode 100644 index d1abe4a4..00000000 --- a/nuon/api/installs/get_app_installs.py +++ /dev/null @@ -1,260 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install import AppInstall -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["q"] = q - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/installs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstall.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstall']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstall']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstall']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an app - - Args: - app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstall']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - q=q, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_current_install_inputs.py b/nuon/api/installs/get_current_install_inputs.py deleted file mode 100644 index 50c178de..00000000 --- a/nuon/api/installs/get_current_install_inputs.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_inputs import AppInstallInputs -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/inputs/current", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallInputs.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - """get an installs current inputs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - """get an installs current inputs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallInputs, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - """get an installs current inputs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - """get an installs current inputs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallInputs, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install.py b/nuon/api/installs/get_install.py deleted file mode 100644 index 4b4ce73e..00000000 --- a/nuon/api/installs/get_install.py +++ /dev/null @@ -1,191 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install import AppInstall -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstall, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstall.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstall, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstall, StderrErrResponse]]: - """get an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstall, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstall, StderrErrResponse]]: - """get an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstall, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstall, StderrErrResponse]]: - """get an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstall, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstall, StderrErrResponse]]: - """get an install - - Forget an install that has been deleted outside of nuon. - - This should only be used in cases where an install was broken in an unordinary way and needs to be - manually deleted so the parent resources can be deleted. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstall, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_action_workflow.py b/nuon/api/installs/get_install_action_workflow.py deleted file mode 100644 index ae21ad96..00000000 --- a/nuon/api/installs/get_install_action_workflow.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow import AppInstallActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - action_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows/{action_workflow_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallActionWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get an install action workflow - - Get an install action workflow. - - Args: - install_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - action_workflow_id=action_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get an install action workflow - - Get an install action workflow. - - Args: - install_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - action_workflow_id=action_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get an install action workflow - - Get an install action workflow. - - Args: - install_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - action_workflow_id=action_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - action_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: - """get an install action workflow - - Get an install action workflow. - - Args: - install_id (str): - action_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - action_workflow_id=action_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_action_workflows.py b/nuon/api/installs/get_install_action_workflows.py deleted file mode 100644 index 1c61d1ee..00000000 --- a/nuon/api/installs/get_install_action_workflows.py +++ /dev/null @@ -1,253 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_action_workflow import AppInstallActionWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/action-workflows", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get an installs action workflows - - Get install action workflows. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get an installs action workflows - - Get install action workflows. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallActionWorkflow']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get an installs action workflows - - Get install action workflows. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: - """get an installs action workflows - - Get install action workflows. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallActionWorkflow']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_audit_logs.py b/nuon/api/installs/get_install_audit_logs.py deleted file mode 100644 index bbed757e..00000000 --- a/nuon/api/installs/get_install_audit_logs.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_audit_log import AppInstallAuditLog -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response - - -def _get_kwargs( - install_id: str, - *, - start: str, - end: str, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["start"] = start - - params["end"] = end - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/audit_logs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.text - for response_200_item_data in _response_200: - response_200_item = AppInstallAuditLog.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.text) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.text) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.text) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.text) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.text) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - start: str, - end: str, -) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: - """get install audit logs - - Args: - install_id (str): - start (str): - end (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallAuditLog']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - start=start, - end=end, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - start: str, - end: str, -) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: - """get install audit logs - - Args: - install_id (str): - start (str): - end (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallAuditLog']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - start=start, - end=end, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - start: str, - end: str, -) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: - """get install audit logs - - Args: - install_id (str): - start (str): - end (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallAuditLog']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - start=start, - end=end, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - start: str, - end: str, -) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: - """get install audit logs - - Args: - install_id (str): - start (str): - end (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallAuditLog']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - start=start, - end=end, - ) - ).parsed diff --git a/nuon/api/installs/get_install_component.py b/nuon/api/installs/get_install_component.py deleted file mode 100644 index 8790eaee..00000000 --- a/nuon/api/installs/get_install_component.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_component import AppInstallComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/components/{component_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallComponent.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallComponent, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallComponent, StderrErrResponse]]: - """get an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: - """get an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallComponent, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallComponent, StderrErrResponse]]: - """get an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallComponent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: - """get an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallComponent, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_component_deploys.py b/nuon/api/installs/get_install_component_deploys.py deleted file mode 100644 index 63e55797..00000000 --- a/nuon/api/installs/get_install_component_deploys.py +++ /dev/null @@ -1,258 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_deploy import AppInstallDeploy -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - component_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/components/{component_id}/deploys", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallDeploy.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get an install components deploys - - Args: - install_id (str): - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallDeploy']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get an install components deploys - - Args: - install_id (str): - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallDeploy']] - """ - - return sync_detailed( - install_id=install_id, - component_id=component_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get an install components deploys - - Args: - install_id (str): - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallDeploy']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get an install components deploys - - Args: - install_id (str): - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallDeploy']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - component_id=component_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_component_latest_deploy.py b/nuon/api/installs/get_install_component_latest_deploy.py deleted file mode 100644 index 7282d2e7..00000000 --- a/nuon/api/installs/get_install_component_latest_deploy.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_deploy import AppInstallDeploy -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/components/{component_id}/deploys/latest", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallDeploy.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get the latest deploy for an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get the latest deploy for an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get the latest deploy for an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get the latest deploy for an install component - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_component_outputs.py b/nuon/api/installs/get_install_component_outputs.py deleted file mode 100644 index 44d5b26b..00000000 --- a/nuon/api/installs/get_install_component_outputs.py +++ /dev/null @@ -1,200 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_install_component_outputs_response_200 import GetInstallComponentOutputsResponse200 -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/components/{component_id}/outputs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: - if response.status_code == 200: - response_200 = GetInstallComponentOutputsResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: - """get an install component outputs - - Return the latest outputs for a component. - - **NOTE** requires a valid install. - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: - """get an install component outputs - - Return the latest outputs for a component. - - **NOTE** requires a valid install. - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetInstallComponentOutputsResponse200, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: - """get an install component outputs - - Return the latest outputs for a component. - - **NOTE** requires a valid install. - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: - """get an install component outputs - - Return the latest outputs for a component. - - **NOTE** requires a valid install. - - Args: - install_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetInstallComponentOutputsResponse200, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - component_id=component_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_components.py b/nuon/api/installs/get_install_components.py deleted file mode 100644 index 08fd4b77..00000000 --- a/nuon/api/installs/get_install_components.py +++ /dev/null @@ -1,230 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_component import AppInstallComponent -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/components", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallComponent.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: - """get an installs components - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallComponent']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: - """get an installs components - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallComponent']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: - """get an installs components - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallComponent']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: - """get an installs components - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallComponent']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_components_summary.py b/nuon/api/installs/get_install_components_summary.py deleted file mode 100644 index 1e3d1df4..00000000 --- a/nuon/api/installs/get_install_components_summary.py +++ /dev/null @@ -1,275 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_component_summary import AppInstallComponentSummary -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["types"] = types - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params["q"] = q - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/components/summary", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallComponentSummary.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: - """get an installs components summary - - Args: - install_id (str): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallComponentSummary']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - types=types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: - """get an installs components summary - - Args: - install_id (str): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallComponentSummary']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - types=types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: - """get an installs components summary - - Args: - install_id (str): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallComponentSummary']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - types=types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - types: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: - """get an installs components summary - - Args: - install_id (str): - types (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallComponentSummary']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - types=types, - offset=offset, - limit=limit, - page=page, - q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_deploy.py b/nuon/api/installs/get_install_deploy.py deleted file mode 100644 index b086ff60..00000000 --- a/nuon/api/installs/get_install_deploy.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_deploy import AppInstallDeploy -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - deploy_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/deploys/{deploy_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallDeploy.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - deploy_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - deploy_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - deploy_id=deploy_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - deploy_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - deploy_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - deploy_id=deploy_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - deploy_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - deploy_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - deploy_id=deploy_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - deploy_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - deploy_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - deploy_id=deploy_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_deploys.py b/nuon/api/installs/get_install_deploys.py deleted file mode 100644 index a8047539..00000000 --- a/nuon/api/installs/get_install_deploys.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_deploy import AppInstallDeploy -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/deploys", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallDeploy.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get all deploys to an install - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallDeploy']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get all deploys to an install - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallDeploy']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get all deploys to an install - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallDeploy']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: - """get all deploys to an install - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallDeploy']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_event.py b/nuon/api/installs/get_install_event.py deleted file mode 100644 index efc795f4..00000000 --- a/nuon/api/installs/get_install_event.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_event import AppInstallEvent -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - event_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/events/{event_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallEvent.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallEvent, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - event_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallEvent, StderrErrResponse]]: - """get an install event - - Get a single install event. - - Args: - install_id (str): - event_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallEvent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - event_id=event_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - event_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: - """get an install event - - Get a single install event. - - Args: - install_id (str): - event_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallEvent, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - event_id=event_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - event_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallEvent, StderrErrResponse]]: - """get an install event - - Get a single install event. - - Args: - install_id (str): - event_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallEvent, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - event_id=event_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - event_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: - """get an install event - - Get a single install event. - - Args: - install_id (str): - event_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallEvent, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - event_id=event_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_events.py b/nuon/api/installs/get_install_events.py deleted file mode 100644 index 90eeb06d..00000000 --- a/nuon/api/installs/get_install_events.py +++ /dev/null @@ -1,261 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_event import AppInstallEvent -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/events", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallEvent.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: - """get events for an install - - # Get Install Events - - Return an event stream for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallEvent']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: - """get events for an install - - # Get Install Events - - Return an event stream for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallEvent']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: - """get events for an install - - # Get Install Events - - Return an event stream for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallEvent']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: - """get events for an install - - # Get Install Events - - Return an event stream for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallEvent']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_inputs.py b/nuon/api/installs/get_install_inputs.py deleted file mode 100644 index 96242548..00000000 --- a/nuon/api/installs/get_install_inputs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_inputs import AppInstallInputs -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/inputs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallInputs.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: - """get an installs inputs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallInputs']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: - """get an installs inputs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallInputs']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: - """get an installs inputs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallInputs']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: - """get an installs inputs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallInputs']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_latest_deploy.py b/nuon/api/installs/get_install_latest_deploy.py deleted file mode 100644 index c0bb3436..00000000 --- a/nuon/api/installs/get_install_latest_deploy.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_deploy import AppInstallDeploy -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/deploys/latest", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallDeploy.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallDeploy, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_readme.py b/nuon/api/installs/get_install_readme.py deleted file mode 100644 index 60737b67..00000000 --- a/nuon/api/installs/get_install_readme.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_readme import ServiceReadme -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/readme", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceReadme, StderrErrResponse]]: - if response.status_code == 200: - response_200 = ServiceReadme.from_dict(response.json()) - - return response_200 - if response.status_code == 206: - response_206 = ServiceReadme.from_dict(response.json()) - - return response_206 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceReadme, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[ServiceReadme, StderrErrResponse]]: - """get install readme rendered with - - Returns the `app.readme` markdown with the values interpolated from the install - inputs and component outputs. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceReadme, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[ServiceReadme, StderrErrResponse]]: - """get install readme rendered with - - Returns the `app.readme` markdown with the values interpolated from the install - inputs and component outputs. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceReadme, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[ServiceReadme, StderrErrResponse]]: - """get install readme rendered with - - Returns the `app.readme` markdown with the values interpolated from the install - inputs and component outputs. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceReadme, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[ServiceReadme, StderrErrResponse]]: - """get install readme rendered with - - Returns the `app.readme` markdown with the values interpolated from the install - inputs and component outputs. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceReadme, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_runner_group.py b/nuon/api/installs/get_install_runner_group.py deleted file mode 100644 index f34cfd2e..00000000 --- a/nuon/api/installs/get_install_runner_group.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_group import AppRunnerGroup -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/runner-group", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunnerGroup.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an install's runner group - - Return the runner group, including runners and settings for the provided install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an install's runner group - - Return the runner group, including runners and settings for the provided install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerGroup, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an install's runner group - - Return the runner group, including runners and settings for the provided install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an install's runner group - - Return the runner group, including runners and settings for the provided install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerGroup, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_sandbox_run.py b/nuon/api/installs/get_install_sandbox_run.py deleted file mode 100644 index d81eac16..00000000 --- a/nuon/api/installs/get_install_sandbox_run.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_sandbox_run import AppInstallSandboxRun -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/sandbox-runs/{run_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallSandboxRun.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - run_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: - """get an install sandbox run - - Args: - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallSandboxRun, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - run_id=run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - run_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: - """get an install sandbox run - - Args: - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallSandboxRun, StderrErrResponse] - """ - - return sync_detailed( - run_id=run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - run_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: - """get an install sandbox run - - Args: - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallSandboxRun, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - run_id=run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - run_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: - """get an install sandbox run - - Args: - run_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallSandboxRun, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - run_id=run_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_sandbox_runs.py b/nuon/api/installs/get_install_sandbox_runs.py deleted file mode 100644 index 273feca6..00000000 --- a/nuon/api/installs/get_install_sandbox_runs.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_sandbox_run import AppInstallSandboxRun -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/sandbox-runs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstallSandboxRun.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: - """get an installs sandbox runs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallSandboxRun']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: - """get an installs sandbox runs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallSandboxRun']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: - """get an installs sandbox runs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstallSandboxRun']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: - """get an installs sandbox runs - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstallSandboxRun']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_install_stack.py b/nuon/api/installs/get_install_stack.py deleted file mode 100644 index e4218cf7..00000000 --- a/nuon/api/installs/get_install_stack.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_stack import AppInstallStack -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - stack_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/stacks/{stack_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallStack.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallStack, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - stack_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by stack ID - - Args: - stack_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallStack, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - stack_id=stack_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - stack_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by stack ID - - Args: - stack_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallStack, StderrErrResponse] - """ - - return sync_detailed( - stack_id=stack_id, - client=client, - ).parsed - - -async def asyncio_detailed( - stack_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by stack ID - - Args: - stack_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallStack, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - stack_id=stack_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - stack_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by stack ID - - Args: - stack_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallStack, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - stack_id=stack_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_stack_by_install_id.py b/nuon/api/installs/get_install_stack_by_install_id.py deleted file mode 100644 index 519195aa..00000000 --- a/nuon/api/installs/get_install_stack_by_install_id.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_stack import AppInstallStack -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/stack", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallStack.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallStack, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by install ID - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallStack, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by install ID - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallStack, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by install ID - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallStack, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: - """get an install stack by install ID - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallStack, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_stack_runs.py b/nuon/api/installs/get_install_stack_runs.py deleted file mode 100644 index a7bfad6a..00000000 --- a/nuon/api/installs/get_install_stack_runs.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_stack_version_run import AppInstallStackVersionRun -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/stack-runs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallStackVersionRun.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: - """get an install's stack runs - - get install stack runs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallStackVersionRun, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: - """get an install's stack runs - - get install stack runs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallStackVersionRun, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: - """get an install's stack runs - - get install stack runs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallStackVersionRun, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: - """get an install's stack runs - - get install stack runs - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallStackVersionRun, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_state.py b/nuon/api/installs/get_install_state.py deleted file mode 100644 index 73e08c5c..00000000 --- a/nuon/api/installs/get_install_state.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.github_com_powertoolsdev_mono_pkg_types_state_state import GithubComPowertoolsdevMonoPkgTypesStateState -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/state", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: - if response.status_code == 200: - response_200 = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: - """Get the current state of an install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: - """Get the current state of an install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: - """Get the current state of an install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: - """Get the current state of an install. - - Args: - install_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_workflow.py b/nuon/api/installs/get_install_workflow.py deleted file mode 100644 index 7add3a78..00000000 --- a/nuon/api/installs/get_install_workflow.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow import AppWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/install-workflows/{install_workflow_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """get an install workflow - - Return a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """get an install workflow - - Return a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """get an install workflow - - Return a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """get an install workflow - - Return a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_workflow_step.py b/nuon/api/installs/get_install_workflow_step.py deleted file mode 100644 index 7ceb6b78..00000000 --- a/nuon/api/installs/get_install_workflow_step.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step import AppWorkflowStep -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, - install_workflow_step_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/install-workflows/{install_workflow_id}/steps/{install_workflow_step_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflowStep.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: - """get an install workflow step - - Return a single workflow step. - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStep, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - install_workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: - """get an install workflow step - - Return a single workflow step. - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStep, StderrErrResponse] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: - """get an install workflow step - - Return a single workflow step. - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStep, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - install_workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: - """get an install workflow step - - Return a single workflow step. - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStep, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_workflow_step_approval.py b/nuon/api/installs/get_install_workflow_step_approval.py deleted file mode 100644 index dfd267d6..00000000 --- a/nuon/api/installs/get_install_workflow_step_approval.py +++ /dev/null @@ -1,197 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step_approval import AppWorkflowStepApproval -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/install-workflows/{install_workflow_id}/steps/{install_workflow_step_id}/approvals/{approval_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflowStepApproval.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an install workflow step approval - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an install workflow step approval - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an install workflow step approval - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an install workflow step approval - - Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_install_workflow_steps.py b/nuon/api/installs/get_install_workflow_steps.py deleted file mode 100644 index 042bed39..00000000 --- a/nuon/api/installs/get_install_workflow_steps.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step import AppWorkflowStep -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/install-workflows/{install_workflow_id}/steps", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppWorkflowStep.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step - - Return all steps for a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step - - Return all steps for a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step - - Return all steps for a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step - - Return all steps for a workflow. - - Args: - install_workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_org_installs.py b/nuon/api/installs/get_org_installs.py deleted file mode 100644 index ab52b5f6..00000000 --- a/nuon/api/installs/get_org_installs.py +++ /dev/null @@ -1,247 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install import AppInstall -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["q"] = q - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/installs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppInstall.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstall']]] - """ - - kwargs = _get_kwargs( - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstall']] - """ - - return sync_detailed( - client=client, - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppInstall']]] - """ - - kwargs = _get_kwargs( - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: - """get all installs for an org - - Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppInstall']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - q=q, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/get_workflow.py b/nuon/api/installs/get_workflow.py deleted file mode 100644 index 8b645bf3..00000000 --- a/nuon/api/installs/get_workflow.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow import AppWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/workflows/{workflow_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """get a workflow - - Return a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """get a workflow - - Return a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return sync_detailed( - workflow_id=workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """get a workflow - - Return a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """get a workflow - - Return a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_workflow_step.py b/nuon/api/installs/get_workflow_step.py deleted file mode 100644 index 176943fb..00000000 --- a/nuon/api/installs/get_workflow_step.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step import AppWorkflowStep -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, - workflow_step_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflowStep.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: - """get a workflow step - - Return a single workflow step. - - Args: - workflow_id (str): - workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStep, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: - """get a workflow step - - Return a single workflow step. - - Args: - workflow_id (str): - workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStep, StderrErrResponse] - """ - - return sync_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: - """get a workflow step - - Return a single workflow step. - - Args: - workflow_id (str): - workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStep, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - workflow_step_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: - """get a workflow step - - Return a single workflow step. - - Args: - workflow_id (str): - workflow_step_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStep, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_workflow_step_approval.py b/nuon/api/installs/get_workflow_step_approval.py deleted file mode 100644 index f616442f..00000000 --- a/nuon/api/installs/get_workflow_step_approval.py +++ /dev/null @@ -1,197 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step_approval import AppWorkflowStepApproval -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, - workflow_step_id: str, - approval_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflowStepApproval.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an workflow step approval - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an workflow step approval - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] - """ - - return sync_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an workflow step approval - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: - """get an workflow step approval - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_workflow_step_approval_contents.py b/nuon/api/installs/get_workflow_step_approval_contents.py deleted file mode 100644 index 1dbb6e9f..00000000 --- a/nuon/api/installs/get_workflow_step_approval_contents.py +++ /dev/null @@ -1,204 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, - workflow_step_id: str, - approval_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}/contents", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list[int]]]: - if response.status_code == 200: - response_200 = cast(list[int], response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list[int]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list[int]]]: - """get a workflow step approval contents - - Return the contents of a json plan for an approval (compressed). - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list[int]]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list[int]]]: - """get a workflow step approval contents - - Return the contents of a json plan for an approval (compressed). - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list[int]] - """ - - return sync_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list[int]]]: - """get a workflow step approval contents - - Return the contents of a json plan for an approval (compressed). - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list[int]]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - workflow_step_id: str, - approval_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list[int]]]: - """get a workflow step approval contents - - Return the contents of a json plan for an approval (compressed). - - Args: - workflow_id (str): - workflow_step_id (str): - approval_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list[int]] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - workflow_step_id=workflow_step_id, - approval_id=approval_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_workflow_steps.py b/nuon/api/installs/get_workflow_steps.py deleted file mode 100644 index 9ac3de69..00000000 --- a/nuon/api/installs/get_workflow_steps.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step import AppWorkflowStep -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppWorkflowStep.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step - - Return all steps for a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step - - Return all steps for a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] - """ - - return sync_detailed( - workflow_id=workflow_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step - - Return all steps for a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step - - Return all steps for a workflow. - - Args: - workflow_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - ) - ).parsed diff --git a/nuon/api/installs/get_workflows.py b/nuon/api/installs/get_workflows.py deleted file mode 100644 index bb1e4691..00000000 --- a/nuon/api/installs/get_workflows.py +++ /dev/null @@ -1,253 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow import AppWorkflow -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - install_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/installs/{install_id}/workflows", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppWorkflow.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: - """get workflows - - Return workflows for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppWorkflow']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: - """get workflows - - Return workflows for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppWorkflow']] - """ - - return sync_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: - """get workflows - - Return workflows for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppWorkflow']]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: - """get workflows - - Return workflows for an install. - - Args: - install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppWorkflow']] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/installs/phone_home.py b/nuon/api/installs/phone_home.py deleted file mode 100644 index 205c89fb..00000000 --- a/nuon/api/installs/phone_home.py +++ /dev/null @@ -1,216 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_install_phone_home_request import ServiceInstallPhoneHomeRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - phone_home_id: str, - *, - body: ServiceInstallPhoneHomeRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/phone-home/{phone_home_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - phone_home_id: str, - *, - client: AuthenticatedClient, - body: ServiceInstallPhoneHomeRequest, -) -> Response[Union[StderrErrResponse, str]]: - """phone home for an install - - A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully - processing it. - - Args: - install_id (str): - phone_home_id (str): - body (ServiceInstallPhoneHomeRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - phone_home_id=phone_home_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - phone_home_id: str, - *, - client: AuthenticatedClient, - body: ServiceInstallPhoneHomeRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """phone home for an install - - A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully - processing it. - - Args: - install_id (str): - phone_home_id (str): - body (ServiceInstallPhoneHomeRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - phone_home_id=phone_home_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - phone_home_id: str, - *, - client: AuthenticatedClient, - body: ServiceInstallPhoneHomeRequest, -) -> Response[Union[StderrErrResponse, str]]: - """phone home for an install - - A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully - processing it. - - Args: - install_id (str): - phone_home_id (str): - body (ServiceInstallPhoneHomeRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - phone_home_id=phone_home_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - phone_home_id: str, - *, - client: AuthenticatedClient, - body: ServiceInstallPhoneHomeRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """phone home for an install - - A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully - processing it. - - Args: - install_id (str): - phone_home_id (str): - body (ServiceInstallPhoneHomeRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - phone_home_id=phone_home_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/reprovision_install.py b/nuon/api/installs/reprovision_install.py deleted file mode 100644 index 2aee9b9f..00000000 --- a/nuon/api/installs/reprovision_install.py +++ /dev/null @@ -1,203 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_reprovision_install_request import ServiceReprovisionInstallRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceReprovisionInstallRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/reprovision", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: - """reprovision an install - - Reprovision an install sandbox. - - - Args: - install_id (str): - body (ServiceReprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """reprovision an install - - Reprovision an install sandbox. - - - Args: - install_id (str): - body (ServiceReprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: - """reprovision an install - - Reprovision an install sandbox. - - - Args: - install_id (str): - body (ServiceReprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """reprovision an install - - Reprovision an install sandbox. - - - Args: - install_id (str): - body (ServiceReprovisionInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/reprovision_install_sandbox.py b/nuon/api/installs/reprovision_install_sandbox.py deleted file mode 100644 index ccc4f94b..00000000 --- a/nuon/api/installs/reprovision_install_sandbox.py +++ /dev/null @@ -1,199 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_reprovision_install_sandbox_request import ServiceReprovisionInstallSandboxRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceReprovisionInstallSandboxRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/reprovision-sandbox", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: - """reprovision an install sandbox - - Reprovision an install sandbox and redeploy all components on top. - - Args: - install_id (str): - body (ServiceReprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """reprovision an install sandbox - - Reprovision an install sandbox and redeploy all components on top. - - Args: - install_id (str): - body (ServiceReprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: - """reprovision an install sandbox - - Reprovision an install sandbox and redeploy all components on top. - - Args: - install_id (str): - body (ServiceReprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceReprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """reprovision an install sandbox - - Reprovision an install sandbox and redeploy all components on top. - - Args: - install_id (str): - body (ServiceReprovisionInstallSandboxRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/retry_owner_workflow_by_id.py b/nuon/api/installs/retry_owner_workflow_by_id.py deleted file mode 100644 index 4214cd1f..00000000 --- a/nuon/api/installs/retry_owner_workflow_by_id.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_retry_workflow_by_id_request import ServiceRetryWorkflowByIDRequest -from ...models.service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, - *, - body: ServiceRetryWorkflowByIDRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/workflows/{workflow_id}/retry", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: - if response.status_code == 201: - response_201 = ServiceRetryWorkflowByIDResponse.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowByIDRequest, -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - workflow_id (str): - body (ServiceRetryWorkflowByIDRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowByIDRequest, -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - workflow_id (str): - body (ServiceRetryWorkflowByIDRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] - """ - - return sync_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowByIDRequest, -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - workflow_id (str): - body (ServiceRetryWorkflowByIDRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowByIDRequest, -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - workflow_id (str): - body (ServiceRetryWorkflowByIDRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/retry_workflow.py b/nuon/api/installs/retry_workflow.py deleted file mode 100644 index a116384e..00000000 --- a/nuon/api/installs/retry_workflow.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_retry_workflow_request import ServiceRetryWorkflowRequest -from ...models.service_retry_workflow_response import ServiceRetryWorkflowResponse -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceRetryWorkflowRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/retry-workflow", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: - if response.status_code == 201: - response_201 = ServiceRetryWorkflowResponse.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowRequest, -) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - install_id (str): - body (ServiceRetryWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowRequest, -) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - install_id (str): - body (ServiceRetryWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRetryWorkflowResponse, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowRequest, -) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - install_id (str): - body (ServiceRetryWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceRetryWorkflowRequest, -) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: - """rerun the workflow steps starting from input step id, can be used to retry a failed step - - Args: - install_id (str): - body (ServiceRetryWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRetryWorkflowResponse, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/sync_secrets.py b/nuon/api/installs/sync_secrets.py deleted file mode 100644 index 6eccb51c..00000000 --- a/nuon/api/installs/sync_secrets.py +++ /dev/null @@ -1,199 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_sync_secrets_request import ServiceSyncSecretsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceSyncSecretsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/sync-secrets", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceSyncSecretsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """sync secrets install - - Execute the sync secrets workflow. - - Args: - install_id (str): - body (ServiceSyncSecretsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceSyncSecretsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """sync secrets install - - Execute the sync secrets workflow. - - Args: - install_id (str): - body (ServiceSyncSecretsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceSyncSecretsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """sync secrets install - - Execute the sync secrets workflow. - - Args: - install_id (str): - body (ServiceSyncSecretsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceSyncSecretsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """sync secrets install - - Execute the sync secrets workflow. - - Args: - install_id (str): - body (ServiceSyncSecretsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/teardown_install_component.py b/nuon/api/installs/teardown_install_component.py deleted file mode 100644 index a80fe254..00000000 --- a/nuon/api/installs/teardown_install_component.py +++ /dev/null @@ -1,204 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_teardown_install_component_request import ServiceTeardownInstallComponentRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - component_id: str, - *, - body: ServiceTeardownInstallComponentRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/components/{component_id}/teardown", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentRequest, -) -> Response[Union[StderrErrResponse, str]]: - """teardown an install component - - Args: - install_id (str): - component_id (str): - body (ServiceTeardownInstallComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """teardown an install component - - Args: - install_id (str): - component_id (str): - body (ServiceTeardownInstallComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentRequest, -) -> Response[Union[StderrErrResponse, str]]: - """teardown an install component - - Args: - install_id (str): - component_id (str): - body (ServiceTeardownInstallComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """teardown an install component - - Args: - install_id (str): - component_id (str): - body (ServiceTeardownInstallComponentRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/teardown_install_components.py b/nuon/api/installs/teardown_install_components.py deleted file mode 100644 index 37d607fa..00000000 --- a/nuon/api/installs/teardown_install_components.py +++ /dev/null @@ -1,199 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_teardown_install_components_request import ServiceTeardownInstallComponentsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceTeardownInstallComponentsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/installs/{install_id}/components/teardown-all", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 201: - response_201 = cast(str, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """teardown an install's components - - Teardown all components on an install. - - Args: - install_id (str): - body (ServiceTeardownInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """teardown an install's components - - Teardown all components on an install. - - Args: - install_id (str): - body (ServiceTeardownInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: - """teardown an install's components - - Teardown all components on an install. - - Args: - install_id (str): - body (ServiceTeardownInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceTeardownInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: - """teardown an install's components - - Teardown all components on an install. - - Args: - install_id (str): - body (ServiceTeardownInstallComponentsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/update_install.py b/nuon/api/installs/update_install.py deleted file mode 100644 index d5b78e80..00000000 --- a/nuon/api/installs/update_install.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install import AppInstall -from ...models.service_update_install_request import ServiceUpdateInstallRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceUpdateInstallRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/installs/{install_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstall, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstall.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstall, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: - """update an install - - Args: - install_id (str): - body (ServiceUpdateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstall, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: - """update an install - - Args: - install_id (str): - body (ServiceUpdateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstall, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: - """update an install - - Args: - install_id (str): - body (ServiceUpdateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstall, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: - """update an install - - Args: - install_id (str): - body (ServiceUpdateInstallRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstall, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/update_install_config.py b/nuon/api/installs/update_install_config.py deleted file mode 100644 index 865f015b..00000000 --- a/nuon/api/installs/update_install_config.py +++ /dev/null @@ -1,206 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_config import AppInstallConfig -from ...models.service_update_install_config_request import ServiceUpdateInstallConfigRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - config_id: str, - *, - body: ServiceUpdateInstallConfigRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/installs/{install_id}/configs/{config_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppInstallConfig.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - config_id (str): - body (ServiceUpdateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - config_id=config_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - config_id (str): - body (ServiceUpdateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallConfig, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - config_id=config_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - config_id (str): - body (ServiceUpdateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - config_id=config_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - config_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config - - Args: - install_id (str): - config_id (str): - body (ServiceUpdateInstallConfigRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallConfig, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - config_id=config_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/update_install_inputs.py b/nuon/api/installs/update_install_inputs.py deleted file mode 100644 index 0f84c650..00000000 --- a/nuon/api/installs/update_install_inputs.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_install_inputs import AppInstallInputs -from ...models.service_update_install_inputs_request import ServiceUpdateInstallInputsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_id: str, - *, - body: ServiceUpdateInstallInputsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/installs/{install_id}/inputs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppInstallInputs.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - """Updates install input config for app - - Args: - install_id (str): - body (ServiceUpdateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - """Updates install input config for app - - Args: - install_id (str): - body (ServiceUpdateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallInputs, StderrErrResponse] - """ - - return sync_detailed( - install_id=install_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: - """Updates install input config for app - - Args: - install_id (str): - body (ServiceUpdateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_id=install_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: - """Updates install input config for app - - Args: - install_id (str): - body (ServiceUpdateInstallInputsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppInstallInputs, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_id=install_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/update_install_workflow.py b/nuon/api/installs/update_install_workflow.py deleted file mode 100644 index 52e2d3a2..00000000 --- a/nuon/api/installs/update_install_workflow.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow import AppWorkflow -from ...models.service_update_workflow_request import ServiceUpdateWorkflowRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - install_workflow_id: str, - *, - body: ServiceUpdateWorkflowRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/install-workflows/{install_workflow_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """update an install workflow - - Args: - install_workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - install_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """update an install workflow - - Args: - install_workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return sync_detailed( - install_workflow_id=install_workflow_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - install_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """update an install workflow - - Args: - install_workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - install_workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """update an install workflow - - Args: - install_workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - install_workflow_id=install_workflow_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/installs/update_workflow.py b/nuon/api/installs/update_workflow.py deleted file mode 100644 index b24b2cf3..00000000 --- a/nuon/api/installs/update_workflow.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_workflow import AppWorkflow -from ...models.service_update_workflow_request import ServiceUpdateWorkflowRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workflow_id: str, - *, - body: ServiceUpdateWorkflowRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/workflows/{workflow_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppWorkflow.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """update a workflow - - Args: - workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """update a workflow - - Args: - workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return sync_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: - """update a workflow - - Args: - workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppWorkflow, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workflow_id=workflow_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workflow_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: - """update a workflow - - Args: - workflow_id (str): - body (ServiceUpdateWorkflowRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppWorkflow, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/orgs/__init__.py b/nuon/api/orgs/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/orgs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/orgs/add_user.py b/nuon/api/orgs/add_user.py deleted file mode 100644 index 1ce904e6..00000000 --- a/nuon/api/orgs/add_user.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_account import AppAccount -from ...models.service_create_org_user_request import ServiceCreateOrgUserRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateOrgUserRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/orgs/current/user", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAccount.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Add a user to the current org - - Args: - body (ServiceCreateOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Add a user to the current org - - Args: - body (ServiceCreateOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Add a user to the current org - - Args: - body (ServiceCreateOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Add a user to the current org - - Args: - body (ServiceCreateOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/orgs/create_org.py b/nuon/api/orgs/create_org.py deleted file mode 100644 index 2552c2b0..00000000 --- a/nuon/api/orgs/create_org.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_org import AppOrg -from ...models.service_create_org_request import ServiceCreateOrgRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateOrgRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/orgs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrg, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppOrg.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrg, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: - """create a new org - - Args: - body (ServiceCreateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrg, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: - """create a new org - - Args: - body (ServiceCreateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrg, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: - """create a new org - - Args: - body (ServiceCreateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrg, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: - """create a new org - - Args: - body (ServiceCreateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrg, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/orgs/create_org_invite.py b/nuon/api/orgs/create_org_invite.py deleted file mode 100644 index 0a7f3135..00000000 --- a/nuon/api/orgs/create_org_invite.py +++ /dev/null @@ -1,200 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_org_invite import AppOrgInvite -from ...models.service_create_org_invite_request import ServiceCreateOrgInviteRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateOrgInviteRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/orgs/current/invites", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppOrgInvite.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrgInvite, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgInviteRequest, -) -> Response[Union[AppOrgInvite, StderrErrResponse]]: - """Invite a user to the current org - - Invite a user (by email) to an org. - - This user will receive an email, and when they next log into the application will be added to the - org. - - Args: - body (ServiceCreateOrgInviteRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrgInvite, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgInviteRequest, -) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: - """Invite a user to the current org - - Invite a user (by email) to an org. - - This user will receive an email, and when they next log into the application will be added to the - org. - - Args: - body (ServiceCreateOrgInviteRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrgInvite, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgInviteRequest, -) -> Response[Union[AppOrgInvite, StderrErrResponse]]: - """Invite a user to the current org - - Invite a user (by email) to an org. - - This user will receive an email, and when they next log into the application will be added to the - org. - - Args: - body (ServiceCreateOrgInviteRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrgInvite, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateOrgInviteRequest, -) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: - """Invite a user to the current org - - Invite a user (by email) to an org. - - This user will receive an email, and when they next log into the application will be added to the - org. - - Args: - body (ServiceCreateOrgInviteRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrgInvite, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/orgs/delete_org.py b/nuon/api/orgs/delete_org.py deleted file mode 100644 index 9996fbff..00000000 --- a/nuon/api/orgs/delete_org.py +++ /dev/null @@ -1,145 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": "/v1/orgs/current", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 200: - response_200 = cast(bool, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """Delete an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """Delete an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: - """Delete an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: - """Delete an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/orgs/get_org.py b/nuon/api/orgs/get_org.py deleted file mode 100644 index 89f03789..00000000 --- a/nuon/api/orgs/get_org.py +++ /dev/null @@ -1,147 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_org import AppOrg -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/orgs/current", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrg, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppOrg.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrg, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppOrg, StderrErrResponse]]: - """Get an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrg, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppOrg, StderrErrResponse]]: - """Get an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrg, StderrErrResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppOrg, StderrErrResponse]]: - """Get an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrg, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppOrg, StderrErrResponse]]: - """Get an org - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrg, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/orgs/get_org_acounts.py b/nuon/api/orgs/get_org_acounts.py deleted file mode 100644 index 00ed48c2..00000000 --- a/nuon/api/orgs/get_org_acounts.py +++ /dev/null @@ -1,227 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_account import AppAccount -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/orgs/current/accounts", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppAccount.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Get user accounts for current org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Get user accounts for current org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return sync_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Get user accounts for current org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Get user accounts for current org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/orgs/get_org_invites.py b/nuon/api/orgs/get_org_invites.py deleted file mode 100644 index f149afa9..00000000 --- a/nuon/api/orgs/get_org_invites.py +++ /dev/null @@ -1,240 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_org_invite import AppOrgInvite -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/orgs/current/invites", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppOrgInvite.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: - """Return org invites - - Returns a list of all invites to the org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppOrgInvite']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: - """Return org invites - - Returns a list of all invites to the org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppOrgInvite']] - """ - - return sync_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: - """Return org invites - - Returns a list of all invites to the org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppOrgInvite']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: - """Return org invites - - Returns a list of all invites to the org. - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppOrgInvite']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/orgs/get_org_runner_group.py b/nuon/api/orgs/get_org_runner_group.py deleted file mode 100644 index ff2f648b..00000000 --- a/nuon/api/orgs/get_org_runner_group.py +++ /dev/null @@ -1,155 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_group import AppRunnerGroup -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/orgs/current/runner-group", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunnerGroup.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an org's runner group - - Get the current org's runner group, which includes the runners and their settings. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an org's runner group - - Get the current org's runner group, which includes the runners and their settings. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerGroup, StderrErrResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an org's runner group - - Get the current org's runner group, which includes the runners and their settings. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: - """Get an org's runner group - - Get the current org's runner group, which includes the runners and their settings. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerGroup, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/orgs/get_orgs.py b/nuon/api/orgs/get_orgs.py deleted file mode 100644 index 623f2c28..00000000 --- a/nuon/api/orgs/get_orgs.py +++ /dev/null @@ -1,232 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_org import AppOrg -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/orgs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppOrg.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: - """Return current user's orgs - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppOrg']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: - """Return current user's orgs - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppOrg']] - """ - - return sync_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: - """Return current user's orgs - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppOrg']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: - """Return current user's orgs - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppOrg']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/orgs/remove_user.py b/nuon/api/orgs/remove_user.py deleted file mode 100644 index 6dcfa533..00000000 --- a/nuon/api/orgs/remove_user.py +++ /dev/null @@ -1,188 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_account import AppAccount -from ...models.service_remove_org_user_request import ServiceRemoveOrgUserRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceRemoveOrgUserRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/orgs/current/remove-user", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppAccount.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceRemoveOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Remove a user from the current org - - Remove a user from an org. - - Args: - body (ServiceRemoveOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceRemoveOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Remove a user from the current org - - Remove a user from an org. - - Args: - body (ServiceRemoveOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceRemoveOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: - """Remove a user from the current org - - Remove a user from an org. - - Args: - body (ServiceRemoveOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppAccount, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceRemoveOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: - """Remove a user from the current org - - Remove a user from an org. - - Args: - body (ServiceRemoveOrgUserRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppAccount, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/orgs/update_org.py b/nuon/api/orgs/update_org.py deleted file mode 100644 index c2f197cb..00000000 --- a/nuon/api/orgs/update_org.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_org import AppOrg -from ...models.service_update_org_request import ServiceUpdateOrgRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceUpdateOrgRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": "/v1/orgs/current", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrg, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppOrg.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrg, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceUpdateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: - """Update current org - - Args: - body (ServiceUpdateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrg, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceUpdateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: - """Update current org - - Args: - body (ServiceUpdateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrg, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceUpdateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: - """Update current org - - Args: - body (ServiceUpdateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppOrg, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceUpdateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: - """Update current org - - Args: - body (ServiceUpdateOrgRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppOrg, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/releases/__init__.py b/nuon/api/releases/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/releases/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/releases/create_component_release.py b/nuon/api/releases/create_component_release.py deleted file mode 100644 index fbba32aa..00000000 --- a/nuon/api/releases/create_component_release.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_release import AppComponentRelease -from ...models.service_create_component_release_request import ServiceCreateComponentReleaseRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - component_id: str, - *, - body: ServiceCreateComponentReleaseRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/components/{component_id}/releases", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppComponentRelease.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentReleaseRequest, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: - """create a release - - Args: - component_id (str): - body (ServiceCreateComponentReleaseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentReleaseRequest, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: - """create a release - - Args: - component_id (str): - body (ServiceCreateComponentReleaseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentRelease, StderrErrResponse] - """ - - return sync_detailed( - component_id=component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentReleaseRequest, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: - """create a release - - Args: - component_id (str): - body (ServiceCreateComponentReleaseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - body: ServiceCreateComponentReleaseRequest, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: - """create a release - - Args: - component_id (str): - body (ServiceCreateComponentReleaseRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentRelease, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/releases/get_app_releases.py b/nuon/api/releases/get_app_releases.py deleted file mode 100644 index 04967a6d..00000000 --- a/nuon/api/releases/get_app_releases.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_release import AppComponentRelease -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - app_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/apps/{app_id}/releases", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponentRelease.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for an app - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentRelease']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for an app - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentRelease']] - """ - - return sync_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for an app - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentRelease']]] - """ - - kwargs = _get_kwargs( - app_id=app_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - app_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for an app - - Args: - app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentRelease']] - """ - - return ( - await asyncio_detailed( - app_id=app_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/releases/get_component_releases.py b/nuon/api/releases/get_component_releases.py deleted file mode 100644 index cec8059d..00000000 --- a/nuon/api/releases/get_component_releases.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_release import AppComponentRelease -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - component_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/components/{component_id}/releases", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponentRelease.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentRelease']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentRelease']] - """ - - return sync_detailed( - component_id=component_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentRelease']]] - """ - - kwargs = _get_kwargs( - component_id=component_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - component_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: - """get all releases for a component - - Args: - component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentRelease']] - """ - - return ( - await asyncio_detailed( - component_id=component_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/releases/get_release.py b/nuon/api/releases/get_release.py deleted file mode 100644 index 21bf24a0..00000000 --- a/nuon/api/releases/get_release.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_release import AppComponentRelease -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - release_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/releases/{release_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppComponentRelease.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - release_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: - """get a release - - Args: - release_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - release_id=release_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - release_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: - """get a release - - Args: - release_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentRelease, StderrErrResponse] - """ - - return sync_detailed( - release_id=release_id, - client=client, - ).parsed - - -async def asyncio_detailed( - release_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: - """get a release - - Args: - release_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - release_id=release_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - release_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: - """get a release - - Args: - release_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppComponentRelease, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - release_id=release_id, - client=client, - ) - ).parsed diff --git a/nuon/api/releases/get_release_steps.py b/nuon/api/releases/get_release_steps.py deleted file mode 100644 index ab5edc00..00000000 --- a/nuon/api/releases/get_release_steps.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_component_release_step import AppComponentReleaseStep -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - release_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/releases/{release_id}/steps", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppComponentReleaseStep.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - release_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release - - Args: - release_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentReleaseStep']]] - """ - - kwargs = _get_kwargs( - release_id=release_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - release_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release - - Args: - release_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentReleaseStep']] - """ - - return sync_detailed( - release_id=release_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - release_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release - - Args: - release_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppComponentReleaseStep']]] - """ - - kwargs = _get_kwargs( - release_id=release_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - release_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release - - Args: - release_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppComponentReleaseStep']] - """ - - return ( - await asyncio_detailed( - release_id=release_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/runners/__init__.py b/nuon/api/runners/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/runners/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/runners/cancel_runner_job.py b/nuon/api/runners/cancel_runner_job.py deleted file mode 100644 index a3c2d5e0..00000000 --- a/nuon/api/runners/cancel_runner_job.py +++ /dev/null @@ -1,201 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_job import AppRunnerJob -from ...models.service_cancel_runner_job_request import ServiceCancelRunnerJobRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_job_id: str, - *, - body: ServiceCancelRunnerJobRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/runner-jobs/{runner_job_id}/cancel", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: - if response.status_code == 202: - response_202 = AppRunnerJob.from_dict(response.json()) - - return response_202 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, - body: ServiceCancelRunnerJobRequest, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: - """cancel runner job - - Cancel a runner job. - - Args: - runner_job_id (str): - body (ServiceCancelRunnerJobRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_job_id: str, - *, - client: AuthenticatedClient, - body: ServiceCancelRunnerJobRequest, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: - """cancel runner job - - Cancel a runner job. - - Args: - runner_job_id (str): - body (ServiceCancelRunnerJobRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerJob, StderrErrResponse] - """ - - return sync_detailed( - runner_job_id=runner_job_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, - body: ServiceCancelRunnerJobRequest, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: - """cancel runner job - - Cancel a runner job. - - Args: - runner_job_id (str): - body (ServiceCancelRunnerJobRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_job_id: str, - *, - client: AuthenticatedClient, - body: ServiceCancelRunnerJobRequest, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: - """cancel runner job - - Cancel a runner job. - - Args: - runner_job_id (str): - body (ServiceCancelRunnerJobRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerJob, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_job_id=runner_job_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/create_terraform_workspace.py b/nuon/api/runners/create_terraform_workspace.py deleted file mode 100644 index 89a3d3b4..00000000 --- a/nuon/api/runners/create_terraform_workspace.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace import AppTerraformWorkspace -from ...models.service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateTerraformWorkspaceRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/terraform-workspace", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppTerraformWorkspace.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformWorkspaceRequest, -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: - """create terraform workspace - - Args: - body (ServiceCreateTerraformWorkspaceRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspace, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformWorkspaceRequest, -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: - """create terraform workspace - - Args: - body (ServiceCreateTerraformWorkspaceRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspace, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformWorkspaceRequest, -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: - """create terraform workspace - - Args: - body (ServiceCreateTerraformWorkspaceRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspace, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateTerraformWorkspaceRequest, -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: - """create terraform workspace - - Args: - body (ServiceCreateTerraformWorkspaceRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspace, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/delete_terraform_workspace.py b/nuon/api/runners/delete_terraform_workspace.py deleted file mode 100644 index 37aab94d..00000000 --- a/nuon/api/runners/delete_terraform_workspace.py +++ /dev/null @@ -1,176 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace import AppTerraformWorkspace -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/v1/terraform-workspace/{workspace_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppTerraformWorkspace.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """delete terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """delete terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """delete terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """delete terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/force_shut_down_runner.py b/nuon/api/runners/force_shut_down_runner.py deleted file mode 100644 index f077148a..00000000 --- a/nuon/api/runners/force_shut_down_runner.py +++ /dev/null @@ -1,207 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_force_shutdown_request import ServiceForceShutdownRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, - *, - body: ServiceForceShutdownRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/runners/{runner_id}/force-shutdown", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 201: - response_201 = cast(bool, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceForceShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """force shut down a runner - - Force shutdown a runner. - - This will result in jobs being lost/cancelled if they are in-flight. - - Args: - runner_id (str): - body (ServiceForceShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceForceShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """force shut down a runner - - Force shutdown a runner. - - This will result in jobs being lost/cancelled if they are in-flight. - - Args: - runner_id (str): - body (ServiceForceShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceForceShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """force shut down a runner - - Force shutdown a runner. - - This will result in jobs being lost/cancelled if they are in-flight. - - Args: - runner_id (str): - body (ServiceForceShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceForceShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """force shut down a runner - - Force shutdown a runner. - - This will result in jobs being lost/cancelled if they are in-flight. - - Args: - runner_id (str): - body (ServiceForceShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/get_log_stream.py b/nuon/api/runners/get_log_stream.py deleted file mode 100644 index 83c47701..00000000 --- a/nuon/api/runners/get_log_stream.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_log_stream import AppLogStream -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - log_stream_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/log-streams/{log_stream_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppLogStream, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppLogStream.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppLogStream, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - log_stream_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppLogStream, StderrErrResponse]]: - """get a log stream - - Return a log stream. - - Args: - log_stream_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppLogStream, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - log_stream_id=log_stream_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - log_stream_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppLogStream, StderrErrResponse]]: - """get a log stream - - Return a log stream. - - Args: - log_stream_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppLogStream, StderrErrResponse] - """ - - return sync_detailed( - log_stream_id=log_stream_id, - client=client, - ).parsed - - -async def asyncio_detailed( - log_stream_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppLogStream, StderrErrResponse]]: - """get a log stream - - Return a log stream. - - Args: - log_stream_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppLogStream, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - log_stream_id=log_stream_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - log_stream_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppLogStream, StderrErrResponse]]: - """get a log stream - - Return a log stream. - - Args: - log_stream_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppLogStream, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - log_stream_id=log_stream_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_connect_status.py b/nuon/api/runners/get_runner_connect_status.py deleted file mode 100644 index 730477b0..00000000 --- a/nuon/api/runners/get_runner_connect_status.py +++ /dev/null @@ -1,203 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_runner_connection_status import ServiceRunnerConnectionStatus -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/{runner_id}/connected", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: - if response.status_code == 200: - response_200 = ServiceRunnerConnectionStatus.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: - """get a runner connection satus based on heartbeat - - # get runner connect status - - The connected status is based on runner heartbeat: - - if no heart beat found — false - if heart beat > 15 seconds ago — false, hb timestamp - if the heart beat < 15 seconds ago — true - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: - """get a runner connection satus based on heartbeat - - # get runner connect status - - The connected status is based on runner heartbeat: - - if no heart beat found — false - if heart beat > 15 seconds ago — false, hb timestamp - if the heart beat < 15 seconds ago — true - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRunnerConnectionStatus, StderrErrResponse] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: - """get a runner connection satus based on heartbeat - - # get runner connect status - - The connected status is based on runner heartbeat: - - if no heart beat found — false - if heart beat > 15 seconds ago — false, hb timestamp - if the heart beat < 15 seconds ago — true - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: - """get a runner connection satus based on heartbeat - - # get runner connect status - - The connected status is based on runner heartbeat: - - if no heart beat found — false - if heart beat > 15 seconds ago — false, hb timestamp - if the heart beat < 15 seconds ago — true - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ServiceRunnerConnectionStatus, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_job.py b/nuon/api/runners/get_runner_job.py deleted file mode 100644 index 787f6d51..00000000 --- a/nuon/api/runners/get_runner_job.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_job import AppRunnerJob -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_job_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runner-jobs/{runner_job_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunnerJob.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: - """get runner job - - Return a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: - """get runner job - - Return a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerJob, StderrErrResponse] - """ - - return sync_detailed( - runner_job_id=runner_job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: - """get runner job - - Return a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: - """get runner job - - Return a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerJob, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_job_id=runner_job_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_job_plan.py b/nuon/api/runners/get_runner_job_plan.py deleted file mode 100644 index 86b42871..00000000 --- a/nuon/api/runners/get_runner_job_plan.py +++ /dev/null @@ -1,177 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_job_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runner-jobs/{runner_job_id}/plan", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: - if response.status_code == 200: - response_200 = cast(str, response.json()) - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: - """get runner job plan - - Return a plan for a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: - """get runner job plan - - Return a plan for a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return sync_detailed( - runner_job_id=runner_job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: - """get runner job plan - - Return a plan for a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, str]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_job_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: - """get runner job plan - - Return a plan for a runner job. - - Args: - runner_job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, str] - """ - - return ( - await asyncio_detailed( - runner_job_id=runner_job_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_jobs.py b/nuon/api/runners/get_runner_jobs.py deleted file mode 100644 index a3ec3001..00000000 --- a/nuon/api/runners/get_runner_jobs.py +++ /dev/null @@ -1,313 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_job import AppRunnerJob -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - runner_id: str, - *, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["group"] = group - - params["groups"] = groups - - params["status"] = status - - params["statuses"] = statuses - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/{runner_id}/jobs", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppRunnerJob.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: - """get runner jobs - - Return runner jobs. - - Args: - runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppRunnerJob']]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - group=group, - groups=groups, - status=status, - statuses=statuses, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: - """get runner jobs - - Return runner jobs. - - Args: - runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppRunnerJob']] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - group=group, - groups=groups, - status=status, - statuses=statuses, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: - """get runner jobs - - Return runner jobs. - - Args: - runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppRunnerJob']]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - group=group, - groups=groups, - status=status, - statuses=statuses, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: - """get runner jobs - - Return runner jobs. - - Args: - runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppRunnerJob']] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - group=group, - groups=groups, - status=status, - statuses=statuses, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_latest_heart_beat.py b/nuon/api/runners/get_runner_latest_heart_beat.py deleted file mode 100644 index 7d5e6e61..00000000 --- a/nuon/api/runners/get_runner_latest_heart_beat.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_heart_beat import AppRunnerHeartBeat -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/{runner_id}/latest-heart-beat", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunnerHeartBeat.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner - - - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerHeartBeat, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner - - - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerHeartBeat, StderrErrResponse] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner - - - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerHeartBeat, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner - - - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerHeartBeat, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_recent_health_checks.py b/nuon/api/runners/get_runner_recent_health_checks.py deleted file mode 100644 index 9dab4df3..00000000 --- a/nuon/api/runners/get_runner_recent_health_checks.py +++ /dev/null @@ -1,268 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_health_check import AppRunnerHealthCheck -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - runner_id: str, - *, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["window"] = window - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/{runner_id}/recent-health-checks", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppRunnerHealthCheck.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: - """get recent health checks - - - - Args: - runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppRunnerHealthCheck']]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - window=window, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: - """get recent health checks - - - - Args: - runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppRunnerHealthCheck']] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - window=window, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: - """get recent health checks - - - - Args: - runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppRunnerHealthCheck']]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - window=window, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: - """get recent health checks - - - - Args: - runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppRunnerHealthCheck']] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - window=window, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/runners/get_runner_settings.py b/nuon/api/runners/get_runner_settings.py deleted file mode 100644 index 3162b948..00000000 --- a/nuon/api/runners/get_runner_settings.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_group_settings import AppRunnerGroupSettings -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/{runner_id}/settings", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunnerGroupSettings.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: - """get runner settings - - Return runner settings for the provided runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerGroupSettings, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: - """get runner settings - - Return runner settings for the provided runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerGroupSettings, StderrErrResponse] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: - """get runner settings - - Return runner settings for the provided runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerGroupSettings, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: - """get runner settings - - Return runner settings for the provided runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerGroupSettings, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_current_state_data.py b/nuon/api/runners/get_terraform_current_state_data.py deleted file mode 100644 index ba6ffec3..00000000 --- a/nuon/api/runners/get_terraform_current_state_data.py +++ /dev/null @@ -1,147 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/terraform-backend", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppTerraformWorkspaceState.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get current terraform - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get current terraform - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get current terraform - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get current terraform - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_states.py b/nuon/api/runners/get_terraform_states.py deleted file mode 100644 index b8a4ba1b..00000000 --- a/nuon/api/runners/get_terraform_states.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - workspace_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/terraform-workspace/{workspace_id}/states", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppTerraformWorkspaceState.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: - """get terraform states - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: - """get terraform states - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspaceState']] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: - """get terraform states - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: - """get terraform states - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspaceState']] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace.py b/nuon/api/runners/get_terraform_workspace.py deleted file mode 100644 index 17ea418a..00000000 --- a/nuon/api/runners/get_terraform_workspace.py +++ /dev/null @@ -1,176 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace import AppTerraformWorkspace -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/terraform-workspace/{workspace_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppTerraformWorkspace.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspace - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_lock.py b/nuon/api/runners/get_terraform_workspace_lock.py deleted file mode 100644 index 348e0a9e..00000000 --- a/nuon/api/runners/get_terraform_workspace_lock.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_lock import AppTerraformWorkspaceLock -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/terraform-workspaces/{workspace_id}/lock", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppTerraformWorkspaceLock.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: - """get terraform workspace lock - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: - """get terraform workspace lock - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceLock, StderrErrResponse] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: - """get terraform workspace lock - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: - """get terraform workspace lock - - Args: - workspace_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceLock, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_by_id.py b/nuon/api/runners/get_terraform_workspace_state_by_id.py deleted file mode 100644 index 8a65653e..00000000 --- a/nuon/api/runners/get_terraform_workspace_state_by_id.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - state_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/terraform-workspace/{workspace_id}/states/{state_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppTerraformWorkspaceState.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get terraform state by ID - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get terraform state by ID - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return sync_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get terraform state by ID - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """get terraform state by ID - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_json_resources.py b/nuon/api/runners/get_terraform_workspace_state_json_resources.py deleted file mode 100644 index 35bd283e..00000000 --- a/nuon/api/runners/get_terraform_workspace_state_json_resources.py +++ /dev/null @@ -1,186 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_terraform_workspace_state_json_resources_response_200 import ( - GetTerraformWorkspaceStateJSONResourcesResponse200, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - state_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/terraform-workspace/{workspace_id}/state-json/{state_id}/resources", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: - if response.status_code == 200: - response_200 = GetTerraformWorkspaceStateJSONResourcesResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: - r"""get terraform state resources. This output is similar to \"terraform state list\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: - r"""get terraform state resources. This output is similar to \"terraform state list\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse] - """ - - return sync_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: - r"""get terraform state resources. This output is similar to \"terraform state list\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: - r"""get terraform state resources. This output is similar to \"terraform state list\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_resources.py b/nuon/api/runners/get_terraform_workspace_state_resources.py deleted file mode 100644 index aa5c74ee..00000000 --- a/nuon/api/runners/get_terraform_workspace_state_resources.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_state_resource import AppTerraformStateResource -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - state_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/terraform-workspace/{workspace_id}/states/{state_id}/resources", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppTerraformStateResource.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: - """get terraform state resources - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformStateResource']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: - """get terraform state resources - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformStateResource']] - """ - - return sync_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: - """get terraform state resources - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformStateResource']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: - """get terraform state resources - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformStateResource']] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json.py b/nuon/api/runners/get_terraform_workspace_states_json.py deleted file mode 100644 index 5ba82128..00000000 --- a/nuon/api/runners/get_terraform_workspace_states_json.py +++ /dev/null @@ -1,245 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - workspace_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/terraform-workspace/{workspace_id}/state-json", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppTerraformWorkspaceStateJSON.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: - """get terraform states json - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: - """get terraform states json - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: - """get terraform states json - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: - """get terraform states json - - Args: - workspace_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json_by_id.py b/nuon/api/runners/get_terraform_workspace_states_json_by_id.py deleted file mode 100644 index 186a8991..00000000 --- a/nuon/api/runners/get_terraform_workspace_states_json_by_id.py +++ /dev/null @@ -1,186 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_terraform_workspace_states_json_by_id_response_200 import ( - GetTerraformWorkspaceStatesJSONByIDResponse200, -) -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - state_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/terraform-workspace/{workspace_id}/state-json/{state_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: - if response.status_code == 200: - response_200 = GetTerraformWorkspaceStatesJSONByIDResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: - r"""get terraform state json by id. This output is same as \"terraform show --json\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: - r"""get terraform state json by id. This output is same as \"terraform show --json\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse] - """ - - return sync_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: - r"""get terraform state json by id. This output is same as \"terraform show --json\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - state_id=state_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - state_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: - r"""get terraform state json by id. This output is same as \"terraform show --json\" - - Args: - workspace_id (str): - state_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - state_id=state_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runners/get_terraform_workspaces.py b/nuon/api/runners/get_terraform_workspaces.py deleted file mode 100644 index 164a0685..00000000 --- a/nuon/api/runners/get_terraform_workspaces.py +++ /dev/null @@ -1,152 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace import AppTerraformWorkspace -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/terraform-workspaces", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppTerraformWorkspace.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspaces - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspaces - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspaces - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: - """get terraform workspaces - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/nuon/api/runners/graceful_shut_down_runner.py b/nuon/api/runners/graceful_shut_down_runner.py deleted file mode 100644 index e618548c..00000000 --- a/nuon/api/runners/graceful_shut_down_runner.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_graceful_shutdown_request import ServiceGracefulShutdownRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, - *, - body: ServiceGracefulShutdownRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/runners/{runner_id}/graceful-shutdown", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 201: - response_201 = cast(bool, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceGracefulShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down a runner - - Gracefully shut down a runner. - - _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force - shut down instead. - - Args: - runner_id (str): - body (ServiceGracefulShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceGracefulShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down a runner - - Gracefully shut down a runner. - - _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force - shut down instead. - - Args: - runner_id (str): - body (ServiceGracefulShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceGracefulShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down a runner - - Gracefully shut down a runner. - - _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force - shut down instead. - - Args: - runner_id (str): - body (ServiceGracefulShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceGracefulShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down a runner - - Gracefully shut down a runner. - - _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force - shut down instead. - - Args: - runner_id (str): - body (ServiceGracefulShutdownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/lock_terraform_workspace.py b/nuon/api/runners/lock_terraform_workspace.py deleted file mode 100644 index 2222adb9..00000000 --- a/nuon/api/runners/lock_terraform_workspace.py +++ /dev/null @@ -1,213 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState -from ...models.lock_terraform_workspace_body import LockTerraformWorkspaceBody -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - workspace_id: str, - *, - body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - params: dict[str, Any] = {} - - params["job_id"] = job_id - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/terraform-workspaces/{workspace_id}/lock", - "params": params, - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppTerraformWorkspaceState.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """lock terraform state - - Args: - workspace_id (str): - job_id (Union[Unset, str]): - body (LockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - body=body, - job_id=job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, - body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """lock terraform state - - Args: - workspace_id (str): - job_id (Union[Unset, str]): - body (LockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - body=body, - job_id=job_id, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """lock terraform state - - Args: - workspace_id (str): - job_id (Union[Unset, str]): - body (LockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - body=body, - job_id=job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, - body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """lock terraform state - - Args: - workspace_id (str): - job_id (Union[Unset, str]): - body (LockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - body=body, - job_id=job_id, - ) - ).parsed diff --git a/nuon/api/runners/log_stream_read_logs.py b/nuon/api/runners/log_stream_read_logs.py deleted file mode 100644 index 568ee913..00000000 --- a/nuon/api/runners/log_stream_read_logs.py +++ /dev/null @@ -1,202 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_otel_log_record import AppOtelLogRecord -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - log_stream_id: str, - *, - x_nuon_api_offset: str, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - headers["X-Nuon-API-Offset"] = x_nuon_api_offset - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/log-streams/{log_stream_id}/logs", - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppOtelLogRecord.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - log_stream_id: str, - *, - client: AuthenticatedClient, - x_nuon_api_offset: str, -) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: - """read a log stream's logs - - Read OTEL formatted logs for a log stream. - - Args: - log_stream_id (str): - x_nuon_api_offset (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppOtelLogRecord']]] - """ - - kwargs = _get_kwargs( - log_stream_id=log_stream_id, - x_nuon_api_offset=x_nuon_api_offset, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - log_stream_id: str, - *, - client: AuthenticatedClient, - x_nuon_api_offset: str, -) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: - """read a log stream's logs - - Read OTEL formatted logs for a log stream. - - Args: - log_stream_id (str): - x_nuon_api_offset (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppOtelLogRecord']] - """ - - return sync_detailed( - log_stream_id=log_stream_id, - client=client, - x_nuon_api_offset=x_nuon_api_offset, - ).parsed - - -async def asyncio_detailed( - log_stream_id: str, - *, - client: AuthenticatedClient, - x_nuon_api_offset: str, -) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: - """read a log stream's logs - - Read OTEL formatted logs for a log stream. - - Args: - log_stream_id (str): - x_nuon_api_offset (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppOtelLogRecord']]] - """ - - kwargs = _get_kwargs( - log_stream_id=log_stream_id, - x_nuon_api_offset=x_nuon_api_offset, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - log_stream_id: str, - *, - client: AuthenticatedClient, - x_nuon_api_offset: str, -) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: - """read a log stream's logs - - Read OTEL formatted logs for a log stream. - - Args: - log_stream_id (str): - x_nuon_api_offset (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppOtelLogRecord']] - """ - - return ( - await asyncio_detailed( - log_stream_id=log_stream_id, - client=client, - x_nuon_api_offset=x_nuon_api_offset, - ) - ).parsed diff --git a/nuon/api/runners/mng_vm_shut_down.py b/nuon/api/runners/mng_vm_shut_down.py deleted file mode 100644 index 42758447..00000000 --- a/nuon/api/runners/mng_vm_shut_down.py +++ /dev/null @@ -1,191 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_mng_vm_shut_down_request import ServiceMngVMShutDownRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, - *, - body: ServiceMngVMShutDownRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/runners/{runner_id}/mng/shutdown-vm", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 201: - response_201 = cast(bool, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngVMShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner VM - - Args: - runner_id (str): - body (ServiceMngVMShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngVMShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner VM - - Args: - runner_id (str): - body (ServiceMngVMShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngVMShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner VM - - Args: - runner_id (str): - body (ServiceMngVMShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngVMShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner VM - - Args: - runner_id (str): - body (ServiceMngVMShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/shut_down_runner_mng.py b/nuon/api/runners/shut_down_runner_mng.py deleted file mode 100644 index 441dfe1f..00000000 --- a/nuon/api/runners/shut_down_runner_mng.py +++ /dev/null @@ -1,191 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_mng_shut_down_request import ServiceMngShutDownRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, - *, - body: ServiceMngShutDownRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/runners/{runner_id}/mng/shutdown", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 201: - response_201 = cast(bool, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngShutDownRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/unlock_terraform_workspace.py b/nuon/api/runners/unlock_terraform_workspace.py deleted file mode 100644 index ee194f3e..00000000 --- a/nuon/api/runners/unlock_terraform_workspace.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState -from ...models.stderr_err_response import StderrErrResponse -from ...models.unlock_terraform_workspace_body import UnlockTerraformWorkspaceBody -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - *, - body: UnlockTerraformWorkspaceBody, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/terraform-workspaces/{workspace_id}/unlock", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppTerraformWorkspaceState.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - body: UnlockTerraformWorkspaceBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """unlock terraform workspace - - Args: - workspace_id (str): - body (UnlockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - *, - client: AuthenticatedClient, - body: UnlockTerraformWorkspaceBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """unlock terraform workspace - - Args: - workspace_id (str): - body (UnlockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return sync_detailed( - workspace_id=workspace_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - *, - client: AuthenticatedClient, - body: UnlockTerraformWorkspaceBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """unlock terraform workspace - - Args: - workspace_id (str): - body (UnlockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - *, - client: AuthenticatedClient, - body: UnlockTerraformWorkspaceBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """unlock terraform workspace - - Args: - workspace_id (str): - body (UnlockTerraformWorkspaceBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/update_runner_mng.py b/nuon/api/runners/update_runner_mng.py deleted file mode 100644 index 8d0800a2..00000000 --- a/nuon/api/runners/update_runner_mng.py +++ /dev/null @@ -1,191 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.service_mng_update_request import ServiceMngUpdateRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, - *, - body: ServiceMngUpdateRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/runners/{runner_id}/mng/update", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: - if response.status_code == 201: - response_201 = cast(bool, response.json()) - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngUpdateRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngUpdateRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngUpdateRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngUpdateRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngUpdateRequest, -) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngUpdateRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, bool]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceMngUpdateRequest, -) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner management process - - Args: - runner_id (str): - body (ServiceMngUpdateRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, bool] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/update_runner_settings.py b/nuon/api/runners/update_runner_settings.py deleted file mode 100644 index 5fbc831c..00000000 --- a/nuon/api/runners/update_runner_settings.py +++ /dev/null @@ -1,193 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_job_execution import AppRunnerJobExecution -from ...models.service_update_runner_settings_request import ServiceUpdateRunnerSettingsRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, - *, - body: ServiceUpdateRunnerSettingsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/v1/runners/{runner_id}/settings", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunnerJobExecution.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateRunnerSettingsRequest, -) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution - - Args: - runner_id (str): - body (ServiceUpdateRunnerSettingsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerJobExecution, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateRunnerSettingsRequest, -) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution - - Args: - runner_id (str): - body (ServiceUpdateRunnerSettingsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerJobExecution, StderrErrResponse] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateRunnerSettingsRequest, -) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution - - Args: - runner_id (str): - body (ServiceUpdateRunnerSettingsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunnerJobExecution, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, - body: ServiceUpdateRunnerSettingsRequest, -) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution - - Args: - runner_id (str): - body (ServiceUpdateRunnerSettingsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunnerJobExecution, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runners/update_terraform_state.py b/nuon/api/runners/update_terraform_state.py deleted file mode 100644 index 31f4178a..00000000 --- a/nuon/api/runners/update_terraform_state.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState -from ...models.stderr_err_response import StderrErrResponse -from ...models.update_terraform_state_body import UpdateTerraformStateBody -from ...types import Response - - -def _get_kwargs( - *, - body: UpdateTerraformStateBody, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/terraform-backend", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppTerraformWorkspaceState.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: UpdateTerraformStateBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """update terraform state - - Args: - body (UpdateTerraformStateBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: UpdateTerraformStateBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """update terraform state - - Args: - body (UpdateTerraformStateBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: UpdateTerraformStateBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """update terraform state - - Args: - body (UpdateTerraformStateBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: UpdateTerraformStateBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: - """update terraform state - - Args: - body (UpdateTerraformStateBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/runnersrunner/__init__.py b/nuon/api/runnersrunner/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/runnersrunner/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/runnersrunner/get_runner.py b/nuon/api/runnersrunner/get_runner.py deleted file mode 100644 index 3c2429af..00000000 --- a/nuon/api/runnersrunner/get_runner.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner import AppRunner -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - runner_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runners/{runner_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunner, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppRunner.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunner, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunner, StderrErrResponse]]: - """get a runner - - Return a runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunner, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunner, StderrErrResponse]]: - """get a runner - - Return a runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunner, StderrErrResponse] - """ - - return sync_detailed( - runner_id=runner_id, - client=client, - ).parsed - - -async def asyncio_detailed( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppRunner, StderrErrResponse]]: - """get a runner - - Return a runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppRunner, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - runner_id=runner_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppRunner, StderrErrResponse]]: - """get a runner - - Return a runner. - - Args: - runner_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppRunner, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - runner_id=runner_id, - client=client, - ) - ).parsed diff --git a/nuon/api/runnersrunner/get_runner_job_executions.py b/nuon/api/runnersrunner/get_runner_job_executions.py deleted file mode 100644 index 49372fce..00000000 --- a/nuon/api/runnersrunner/get_runner_job_executions.py +++ /dev/null @@ -1,253 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_runner_job_execution import AppRunnerJobExecution -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - runner_job_id: str, - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/runner-jobs/{runner_job_id}/executions", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppRunnerJobExecution.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: - """get runner job executions - - Return executions for a runner job. - - Args: - runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppRunnerJobExecution']]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - runner_job_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: - """get runner job executions - - Return executions for a runner job. - - Args: - runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppRunnerJobExecution']] - """ - - return sync_detailed( - runner_job_id=runner_job_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - runner_job_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: - """get runner job executions - - Return executions for a runner job. - - Args: - runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppRunnerJobExecution']]] - """ - - kwargs = _get_kwargs( - runner_job_id=runner_job_id, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - runner_job_id: str, - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: - """get runner job executions - - Return executions for a runner job. - - Args: - runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppRunnerJobExecution']] - """ - - return ( - await asyncio_detailed( - runner_job_id=runner_job_id, - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/vcs/__init__.py b/nuon/api/vcs/__init__.py deleted file mode 100644 index 2d7c0b23..00000000 --- a/nuon/api/vcs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/vcs/create_vcs_connection.py b/nuon/api/vcs/create_vcs_connection.py deleted file mode 100644 index ff9e9513..00000000 --- a/nuon/api/vcs/create_vcs_connection.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_vcs_connection import AppVCSConnection -from ...models.service_create_connection_request import ServiceCreateConnectionRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateConnectionRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/vcs/connections", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppVCSConnection.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateConnectionRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - """create a vcs connection for Github - - Args: - body (ServiceCreateConnectionRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: ServiceCreateConnectionRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - """create a vcs connection for Github - - Args: - body (ServiceCreateConnectionRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppVCSConnection, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: ServiceCreateConnectionRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - """create a vcs connection for Github - - Args: - body (ServiceCreateConnectionRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: ServiceCreateConnectionRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - """create a vcs connection for Github - - Args: - body (ServiceCreateConnectionRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppVCSConnection, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/vcs/create_vcs_connection_callback.py b/nuon/api/vcs/create_vcs_connection_callback.py deleted file mode 100644 index a894d2ba..00000000 --- a/nuon/api/vcs/create_vcs_connection_callback.py +++ /dev/null @@ -1,180 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_vcs_connection import AppVCSConnection -from ...models.service_create_connection_callback_request import ServiceCreateConnectionCallbackRequest -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - *, - body: ServiceCreateConnectionCallbackRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/vcs/connection-callback", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - if response.status_code == 201: - response_201 = AppVCSConnection.from_dict(response.json()) - - return response_201 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: ServiceCreateConnectionCallbackRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - """public connection to create a vcs connection via a callback - - Args: - body (ServiceCreateConnectionCallbackRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - body: ServiceCreateConnectionCallbackRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - """public connection to create a vcs connection via a callback - - Args: - body (ServiceCreateConnectionCallbackRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppVCSConnection, StderrErrResponse] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: ServiceCreateConnectionCallbackRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - """public connection to create a vcs connection via a callback - - Args: - body (ServiceCreateConnectionCallbackRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - body: ServiceCreateConnectionCallbackRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - """public connection to create a vcs connection via a callback - - Args: - body (ServiceCreateConnectionCallbackRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppVCSConnection, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/nuon/api/vcs/get_org_vcs_connections.py b/nuon/api/vcs/get_org_vcs_connections.py deleted file mode 100644 index 37449de4..00000000 --- a/nuon/api/vcs/get_org_vcs_connections.py +++ /dev/null @@ -1,232 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_vcs_connection import AppVCSConnection -from ...models.stderr_err_response import StderrErrResponse -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - - params: dict[str, Any] = {} - - params["offset"] = offset - - params["limit"] = limit - - params["page"] = page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/vcs/connections", - "params": params, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = AppVCSConnection.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: - """get vcs connection for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppVCSConnection']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: - """get vcs connection for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppVCSConnection']] - """ - - return sync_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: - """get vcs connection for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[StderrErrResponse, list['AppVCSConnection']]] - """ - - kwargs = _get_kwargs( - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: - """get vcs connection for an org - - Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[StderrErrResponse, list['AppVCSConnection']] - """ - - return ( - await asyncio_detailed( - client=client, - offset=offset, - limit=limit, - page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, - ) - ).parsed diff --git a/nuon/api/vcs/get_vcs_connection.py b/nuon/api/vcs/get_vcs_connection.py deleted file mode 100644 index 6d162eaa..00000000 --- a/nuon/api/vcs/get_vcs_connection.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_vcs_connection import AppVCSConnection -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - connection_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/vcs/connections/{connection_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - if response.status_code == 200: - response_200 = AppVCSConnection.from_dict(response.json()) - - return response_200 - if response.status_code == 400: - response_400 = StderrErrResponse.from_dict(response.json()) - - return response_400 - if response.status_code == 401: - response_401 = StderrErrResponse.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = StderrErrResponse.from_dict(response.json()) - - return response_403 - if response.status_code == 404: - response_404 = StderrErrResponse.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = StderrErrResponse.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - connection_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - """returns a vcs connection for an org - - Args: - connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - connection_id=connection_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - connection_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - """returns a vcs connection for an org - - Args: - connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppVCSConnection, StderrErrResponse] - """ - - return sync_detailed( - connection_id=connection_id, - client=client, - ).parsed - - -async def asyncio_detailed( - connection_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: - """returns a vcs connection for an org - - Args: - connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] - """ - - kwargs = _get_kwargs( - connection_id=connection_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - connection_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: - """returns a vcs connection for an org - - Args: - connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AppVCSConnection, StderrErrResponse] - """ - - return ( - await asyncio_detailed( - connection_id=connection_id, - client=client, - ) - ).parsed diff --git a/nuon/client.py b/nuon/client.py deleted file mode 100644 index e80446f1..00000000 --- a/nuon/client.py +++ /dev/null @@ -1,268 +0,0 @@ -import ssl -from typing import Any, Optional, Union - -import httpx -from attrs import define, evolve, field - - -@define -class Client: - """A class for keeping track of data related to the API - - The following are accepted as keyword arguments and will be used to construct httpx Clients internally: - - ``base_url``: The base URL for the API, all requests are made to a relative path to this URL - - ``cookies``: A dictionary of cookies to be sent with every request - - ``headers``: A dictionary of headers to be sent with every request - - ``timeout``: The maximum amount of a time a request can take. API functions will raise - httpx.TimeoutException if this is exceeded. - - ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, - but can be set to False for testing purposes. - - ``follow_redirects``: Whether or not to follow redirects. Default value is False. - - ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. - - - Attributes: - raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a - status code that was not documented in the source OpenAPI document. Can also be provided as a keyword - argument to the constructor. - """ - - raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str = field(alias="base_url") - _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") - _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - - def with_headers(self, headers: dict[str, str]) -> "Client": - """Get a new client matching this one with additional headers""" - if self._client is not None: - self._client.headers.update(headers) - if self._async_client is not None: - self._async_client.headers.update(headers) - return evolve(self, headers={**self._headers, **headers}) - - def with_cookies(self, cookies: dict[str, str]) -> "Client": - """Get a new client matching this one with additional cookies""" - if self._client is not None: - self._client.cookies.update(cookies) - if self._async_client is not None: - self._async_client.cookies.update(cookies) - return evolve(self, cookies={**self._cookies, **cookies}) - - def with_timeout(self, timeout: httpx.Timeout) -> "Client": - """Get a new client matching this one with a new timeout (in seconds)""" - if self._client is not None: - self._client.timeout = timeout - if self._async_client is not None: - self._async_client.timeout = timeout - return evolve(self, timeout=timeout) - - def set_httpx_client(self, client: httpx.Client) -> "Client": - """Manually set the underlying httpx.Client - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._client = client - return self - - def get_httpx_client(self) -> httpx.Client: - """Get the underlying httpx.Client, constructing a new one if not previously set""" - if self._client is None: - self._client = httpx.Client( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._client - - def __enter__(self) -> "Client": - """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" - self.get_httpx_client().__enter__() - return self - - def __exit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for internal httpx.Client (see httpx docs)""" - self.get_httpx_client().__exit__(*args, **kwargs) - - def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": - """Manually the underlying httpx.AsyncClient - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._async_client = async_client - return self - - def get_async_httpx_client(self) -> httpx.AsyncClient: - """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" - if self._async_client is None: - self._async_client = httpx.AsyncClient( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._async_client - - async def __aenter__(self) -> "Client": - """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" - await self.get_async_httpx_client().__aenter__() - return self - - async def __aexit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" - await self.get_async_httpx_client().__aexit__(*args, **kwargs) - - -@define -class AuthenticatedClient: - """A Client which has been authenticated for use on secured endpoints - - The following are accepted as keyword arguments and will be used to construct httpx Clients internally: - - ``base_url``: The base URL for the API, all requests are made to a relative path to this URL - - ``cookies``: A dictionary of cookies to be sent with every request - - ``headers``: A dictionary of headers to be sent with every request - - ``timeout``: The maximum amount of a time a request can take. API functions will raise - httpx.TimeoutException if this is exceeded. - - ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, - but can be set to False for testing purposes. - - ``follow_redirects``: Whether or not to follow redirects. Default value is False. - - ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. - - - Attributes: - raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a - status code that was not documented in the source OpenAPI document. Can also be provided as a keyword - argument to the constructor. - token: The token to use for authentication - prefix: The prefix to use for the Authorization header - auth_header_name: The name of the Authorization header - """ - - raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str = field(alias="base_url") - _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") - _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - - token: str - prefix: str = "Bearer" - auth_header_name: str = "Authorization" - - def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": - """Get a new client matching this one with additional headers""" - if self._client is not None: - self._client.headers.update(headers) - if self._async_client is not None: - self._async_client.headers.update(headers) - return evolve(self, headers={**self._headers, **headers}) - - def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": - """Get a new client matching this one with additional cookies""" - if self._client is not None: - self._client.cookies.update(cookies) - if self._async_client is not None: - self._async_client.cookies.update(cookies) - return evolve(self, cookies={**self._cookies, **cookies}) - - def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": - """Get a new client matching this one with a new timeout (in seconds)""" - if self._client is not None: - self._client.timeout = timeout - if self._async_client is not None: - self._async_client.timeout = timeout - return evolve(self, timeout=timeout) - - def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient": - """Manually set the underlying httpx.Client - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._client = client - return self - - def get_httpx_client(self) -> httpx.Client: - """Get the underlying httpx.Client, constructing a new one if not previously set""" - if self._client is None: - self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token - self._client = httpx.Client( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._client - - def __enter__(self) -> "AuthenticatedClient": - """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" - self.get_httpx_client().__enter__() - return self - - def __exit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for internal httpx.Client (see httpx docs)""" - self.get_httpx_client().__exit__(*args, **kwargs) - - def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient": - """Manually the underlying httpx.AsyncClient - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._async_client = async_client - return self - - def get_async_httpx_client(self) -> httpx.AsyncClient: - """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" - if self._async_client is None: - self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token - self._async_client = httpx.AsyncClient( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._async_client - - async def __aenter__(self) -> "AuthenticatedClient": - """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" - await self.get_async_httpx_client().__aenter__() - return self - - async def __aexit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" - await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/nuon/errors.py b/nuon/errors.py deleted file mode 100644 index 5f92e76a..00000000 --- a/nuon/errors.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Contains shared errors types that can be raised from API functions""" - - -class UnexpectedStatus(Exception): - """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" - - def __init__(self, status_code: int, content: bytes): - self.status_code = status_code - self.content = content - - super().__init__( - f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" - ) - - -__all__ = ["UnexpectedStatus"] diff --git a/nuon/models/__init__.py b/nuon/models/__init__.py deleted file mode 100644 index 6d574099..00000000 --- a/nuon/models/__init__.py +++ /dev/null @@ -1,685 +0,0 @@ -"""Contains all the data models used in inputs/outputs""" - -from .app_account import AppAccount -from .app_account_type import AppAccountType -from .app_action_workflow import AppActionWorkflow -from .app_action_workflow_config import AppActionWorkflowConfig -from .app_action_workflow_step_config import AppActionWorkflowStepConfig -from .app_action_workflow_step_config_env_vars import AppActionWorkflowStepConfigEnvVars -from .app_action_workflow_trigger_config import AppActionWorkflowTriggerConfig -from .app_action_workflow_trigger_type import AppActionWorkflowTriggerType -from .app_app import AppApp -from .app_app_awsiam_policy_config import AppAppAWSIAMPolicyConfig -from .app_app_awsiam_role_config import AppAppAWSIAMRoleConfig -from .app_app_branch import AppAppBranch -from .app_app_break_glass_config import AppAppBreakGlassConfig -from .app_app_config import AppAppConfig -from .app_app_config_status import AppAppConfigStatus -from .app_app_config_version import AppAppConfigVersion -from .app_app_input import AppAppInput -from .app_app_input_config import AppAppInputConfig -from .app_app_input_group import AppAppInputGroup -from .app_app_links import AppAppLinks -from .app_app_permissions_config import AppAppPermissionsConfig -from .app_app_policies_config import AppAppPoliciesConfig -from .app_app_runner_config import AppAppRunnerConfig -from .app_app_runner_config_env_vars import AppAppRunnerConfigEnvVars -from .app_app_runner_config_helm_driver_type import AppAppRunnerConfigHelmDriverType -from .app_app_runner_type import AppAppRunnerType -from .app_app_sandbox_config import AppAppSandboxConfig -from .app_app_sandbox_config_env_vars import AppAppSandboxConfigEnvVars -from .app_app_sandbox_config_variables import AppAppSandboxConfigVariables -from .app_app_secret import AppAppSecret -from .app_app_secret_config import AppAppSecretConfig -from .app_app_secrets_config import AppAppSecretsConfig -from .app_app_stack_config import AppAppStackConfig -from .app_aws_account import AppAWSAccount -from .app_aws_stack_outputs import AppAWSStackOutputs -from .app_awsecr_image_config import AppAWSECRImageConfig -from .app_awsiam_role_type import AppAWSIAMRoleType -from .app_azure_account import AppAzureAccount -from .app_azure_stack_outputs import AppAzureStackOutputs -from .app_cloud_platform import AppCloudPlatform -from .app_cloud_platform_region import AppCloudPlatformRegion -from .app_component import AppComponent -from .app_component_build import AppComponentBuild -from .app_component_build_status import AppComponentBuildStatus -from .app_component_config_connection import AppComponentConfigConnection -from .app_component_links import AppComponentLinks -from .app_component_release import AppComponentRelease -from .app_component_release_step import AppComponentReleaseStep -from .app_component_type import AppComponentType -from .app_composite_status import AppCompositeStatus -from .app_composite_status_metadata import AppCompositeStatusMetadata -from .app_connected_github_vcs_config import AppConnectedGithubVCSConfig -from .app_docker_build_component_config import AppDockerBuildComponentConfig -from .app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars -from .app_external_image_component_config import AppExternalImageComponentConfig -from .app_helm_chart import AppHelmChart -from .app_helm_component_config import AppHelmComponentConfig -from .app_helm_component_config_values import AppHelmComponentConfigValues -from .app_helm_config import AppHelmConfig -from .app_helm_config_values import AppHelmConfigValues -from .app_helm_release import AppHelmRelease -from .app_install import AppInstall -from .app_install_action_workflow import AppInstallActionWorkflow -from .app_install_action_workflow_run import AppInstallActionWorkflowRun -from .app_install_action_workflow_run_outputs import AppInstallActionWorkflowRunOutputs -from .app_install_action_workflow_run_run_env_vars import AppInstallActionWorkflowRunRunEnvVars -from .app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep -from .app_install_action_workflow_run_step_status import AppInstallActionWorkflowRunStepStatus -from .app_install_approval_option import AppInstallApprovalOption -from .app_install_audit_log import AppInstallAuditLog -from .app_install_component import AppInstallComponent -from .app_install_component_links import AppInstallComponentLinks -from .app_install_component_statuses import AppInstallComponentStatuses -from .app_install_component_summary import AppInstallComponentSummary -from .app_install_config import AppInstallConfig -from .app_install_deploy import AppInstallDeploy -from .app_install_deploy_outputs import AppInstallDeployOutputs -from .app_install_deploy_status import AppInstallDeployStatus -from .app_install_deploy_type import AppInstallDeployType -from .app_install_event import AppInstallEvent -from .app_install_event_payload import AppInstallEventPayload -from .app_install_inputs import AppInstallInputs -from .app_install_inputs_redacted_values import AppInstallInputsRedactedValues -from .app_install_inputs_values import AppInstallInputsValues -from .app_install_links import AppInstallLinks -from .app_install_sandbox import AppInstallSandbox -from .app_install_sandbox_run import AppInstallSandboxRun -from .app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs -from .app_install_stack import AppInstallStack -from .app_install_stack_outputs import AppInstallStackOutputs -from .app_install_stack_outputs_data import AppInstallStackOutputsData -from .app_install_stack_version import AppInstallStackVersion -from .app_install_stack_version_run import AppInstallStackVersionRun -from .app_install_stack_version_run_data import AppInstallStackVersionRunData -from .app_install_state import AppInstallState -from .app_installer import AppInstaller -from .app_installer_metadata import AppInstallerMetadata -from .app_installer_type import AppInstallerType -from .app_job_component_config import AppJobComponentConfig -from .app_job_component_config_env_vars import AppJobComponentConfigEnvVars -from .app_json_map import AppJSONMap -from .app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig -from .app_log_stream import AppLogStream -from .app_log_stream_attrs import AppLogStreamAttrs -from .app_notifications_config import AppNotificationsConfig -from .app_oci_artifact import AppOCIArtifact -from .app_oci_artifact_annotations import AppOCIArtifactAnnotations -from .app_operation_status import AppOperationStatus -from .app_org import AppOrg -from .app_org_invite import AppOrgInvite -from .app_org_invite_status import AppOrgInviteStatus -from .app_org_links import AppOrgLinks -from .app_otel_log_record import AppOtelLogRecord -from .app_otel_log_record_log_attributes import AppOtelLogRecordLogAttributes -from .app_otel_log_record_resource_attributes import AppOtelLogRecordResourceAttributes -from .app_otel_log_record_scope_attributes import AppOtelLogRecordScopeAttributes -from .app_policy import AppPolicy -from .app_policy_name import AppPolicyName -from .app_policy_permissions import AppPolicyPermissions -from .app_public_git_vcs_config import AppPublicGitVCSConfig -from .app_role import AppRole -from .app_role_type import AppRoleType -from .app_runner import AppRunner -from .app_runner_group import AppRunnerGroup -from .app_runner_group_settings import AppRunnerGroupSettings -from .app_runner_group_settings_aws_tags import AppRunnerGroupSettingsAwsTags -from .app_runner_group_settings_metadata import AppRunnerGroupSettingsMetadata -from .app_runner_group_type import AppRunnerGroupType -from .app_runner_health_check import AppRunnerHealthCheck -from .app_runner_heart_beat import AppRunnerHeartBeat -from .app_runner_job import AppRunnerJob -from .app_runner_job_execution import AppRunnerJobExecution -from .app_runner_job_execution_outputs import AppRunnerJobExecutionOutputs -from .app_runner_job_execution_outputs_outputs import AppRunnerJobExecutionOutputsOutputs -from .app_runner_job_execution_outputs_outputs_additional_property import ( - AppRunnerJobExecutionOutputsOutputsAdditionalProperty, -) -from .app_runner_job_execution_result import AppRunnerJobExecutionResult -from .app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata -from .app_runner_job_execution_status import AppRunnerJobExecutionStatus -from .app_runner_job_group import AppRunnerJobGroup -from .app_runner_job_metadata import AppRunnerJobMetadata -from .app_runner_job_operation_type import AppRunnerJobOperationType -from .app_runner_job_outputs import AppRunnerJobOutputs -from .app_runner_job_status import AppRunnerJobStatus -from .app_runner_job_type import AppRunnerJobType -from .app_runner_operation import AppRunnerOperation -from .app_runner_operation_type import AppRunnerOperationType -from .app_runner_status import AppRunnerStatus -from .app_sandbox_run_type import AppSandboxRunType -from .app_stack_type import AppStackType -from .app_status import AppStatus -from .app_step_error_behavior import AppStepErrorBehavior -from .app_terraform_lock import AppTerraformLock -from .app_terraform_module_component_config import AppTerraformModuleComponentConfig -from .app_terraform_module_component_config_env_vars import AppTerraformModuleComponentConfigEnvVars -from .app_terraform_module_component_config_variables import AppTerraformModuleComponentConfigVariables -from .app_terraform_state_instance import AppTerraformStateInstance -from .app_terraform_state_instance_attributes import AppTerraformStateInstanceAttributes -from .app_terraform_state_resource import AppTerraformStateResource -from .app_terraform_workspace import AppTerraformWorkspace -from .app_terraform_workspace_lock import AppTerraformWorkspaceLock -from .app_terraform_workspace_state import AppTerraformWorkspaceState -from .app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON -from .app_vcs_connection import AppVCSConnection -from .app_vcs_connection_commit import AppVCSConnectionCommit -from .app_waitlist import AppWaitlist -from .app_workflow import AppWorkflow -from .app_workflow_links import AppWorkflowLinks -from .app_workflow_metadata import AppWorkflowMetadata -from .app_workflow_step import AppWorkflowStep -from .app_workflow_step_approval import AppWorkflowStepApproval -from .app_workflow_step_approval_response import AppWorkflowStepApprovalResponse -from .app_workflow_step_approval_type import AppWorkflowStepApprovalType -from .app_workflow_step_execution_type import AppWorkflowStepExecutionType -from .app_workflow_step_links import AppWorkflowStepLinks -from .app_workflow_step_metadata import AppWorkflowStepMetadata -from .app_workflow_step_policy_validation import AppWorkflowStepPolicyValidation -from .app_workflow_step_response_type import AppWorkflowStepResponseType -from .app_workflow_type import AppWorkflowType -from .config_app_policy_type import ConfigAppPolicyType -from .get_app_config_template_type import GetAppConfigTemplateType -from .get_config_schema_response_200 import GetConfigSchemaResponse200 -from .get_install_component_outputs_response_200 import GetInstallComponentOutputsResponse200 -from .get_terraform_workspace_state_json_resources_response_200 import ( - GetTerraformWorkspaceStateJSONResourcesResponse200, -) -from .get_terraform_workspace_states_json_by_id_response_200 import GetTerraformWorkspaceStatesJSONByIDResponse200 -from .github_com_powertoolsdev_mono_pkg_types_state_state import GithubComPowertoolsdevMonoPkgTypesStateState -from .github_com_powertoolsdev_mono_pkg_types_state_state_components import ( - GithubComPowertoolsdevMonoPkgTypesStateStateComponents, -) -from .helpers_create_install_config_params import HelpersCreateInstallConfigParams -from .lock_terraform_workspace_body import LockTerraformWorkspaceBody -from .outputs_secret_sync_output import OutputsSecretSyncOutput -from .permissions_permission import PermissionsPermission -from .permissions_set import PermissionsSet -from .refs_ref import RefsRef -from .refs_ref_type import RefsRefType -from .service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig -from .service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig -from .service_app_config_template import ServiceAppConfigTemplate -from .service_app_config_template_type import ServiceAppConfigTemplateType -from .service_app_group_request import ServiceAppGroupRequest -from .service_app_input_request import ServiceAppInputRequest -from .service_app_policy_config import ServiceAppPolicyConfig -from .service_app_secret_config import ServiceAppSecretConfig -from .service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest -from .service_cancel_runner_job_request import ServiceCancelRunnerJobRequest -from .service_cli_config import ServiceCLIConfig -from .service_component_children import ServiceComponentChildren -from .service_connected_github_vcs_action_workflow_config_request import ( - ServiceConnectedGithubVCSActionWorkflowConfigRequest, -) -from .service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest -from .service_connected_github_vcs_sandbox_config_request import ServiceConnectedGithubVCSSandboxConfigRequest -from .service_create_action_workflow_config_request import ServiceCreateActionWorkflowConfigRequest -from .service_create_action_workflow_config_step_request import ServiceCreateActionWorkflowConfigStepRequest -from .service_create_action_workflow_config_step_request_env_vars import ( - ServiceCreateActionWorkflowConfigStepRequestEnvVars, -) -from .service_create_action_workflow_config_trigger_request import ServiceCreateActionWorkflowConfigTriggerRequest -from .service_create_app_action_workflow_request import ServiceCreateAppActionWorkflowRequest -from .service_create_app_branch_request import ServiceCreateAppBranchRequest -from .service_create_app_break_glass_config_request import ServiceCreateAppBreakGlassConfigRequest -from .service_create_app_config_request import ServiceCreateAppConfigRequest -from .service_create_app_input_config_request import ServiceCreateAppInputConfigRequest -from .service_create_app_input_config_request_groups import ServiceCreateAppInputConfigRequestGroups -from .service_create_app_input_config_request_inputs import ServiceCreateAppInputConfigRequestInputs -from .service_create_app_permissions_config_request import ServiceCreateAppPermissionsConfigRequest -from .service_create_app_policies_config_request import ServiceCreateAppPoliciesConfigRequest -from .service_create_app_request import ServiceCreateAppRequest -from .service_create_app_runner_config_request import ServiceCreateAppRunnerConfigRequest -from .service_create_app_runner_config_request_env_vars import ServiceCreateAppRunnerConfigRequestEnvVars -from .service_create_app_sandbox_config_request import ServiceCreateAppSandboxConfigRequest -from .service_create_app_sandbox_config_request_env_vars import ServiceCreateAppSandboxConfigRequestEnvVars -from .service_create_app_sandbox_config_request_variables import ServiceCreateAppSandboxConfigRequestVariables -from .service_create_app_secret_request import ServiceCreateAppSecretRequest -from .service_create_app_secrets_config_request import ServiceCreateAppSecretsConfigRequest -from .service_create_app_stack_config_request import ServiceCreateAppStackConfigRequest -from .service_create_component_build_request import ServiceCreateComponentBuildRequest -from .service_create_component_release_request import ServiceCreateComponentReleaseRequest -from .service_create_component_release_request_strategy import ServiceCreateComponentReleaseRequestStrategy -from .service_create_component_request import ServiceCreateComponentRequest -from .service_create_connection_callback_request import ServiceCreateConnectionCallbackRequest -from .service_create_connection_request import ServiceCreateConnectionRequest -from .service_create_docker_build_component_config_request import ServiceCreateDockerBuildComponentConfigRequest -from .service_create_docker_build_component_config_request_env_vars import ( - ServiceCreateDockerBuildComponentConfigRequestEnvVars, -) -from .service_create_external_image_component_config_request import ServiceCreateExternalImageComponentConfigRequest -from .service_create_helm_component_config_request import ServiceCreateHelmComponentConfigRequest -from .service_create_helm_component_config_request_values import ServiceCreateHelmComponentConfigRequestValues -from .service_create_install_action_workflow_run_request import ServiceCreateInstallActionWorkflowRunRequest -from .service_create_install_action_workflow_run_request_run_env_vars import ( - ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, -) -from .service_create_install_config_request import ServiceCreateInstallConfigRequest -from .service_create_install_deploy_request import ServiceCreateInstallDeployRequest -from .service_create_install_inputs_request import ServiceCreateInstallInputsRequest -from .service_create_install_inputs_request_inputs import ServiceCreateInstallInputsRequestInputs -from .service_create_install_request import ServiceCreateInstallRequest -from .service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount -from .service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount -from .service_create_install_request_inputs import ServiceCreateInstallRequestInputs -from .service_create_installer_request import ServiceCreateInstallerRequest -from .service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata -from .service_create_job_component_config_request import ServiceCreateJobComponentConfigRequest -from .service_create_job_component_config_request_env_vars import ServiceCreateJobComponentConfigRequestEnvVars -from .service_create_kubernetes_manifest_component_config_request import ( - ServiceCreateKubernetesManifestComponentConfigRequest, -) -from .service_create_org_invite_request import ServiceCreateOrgInviteRequest -from .service_create_org_request import ServiceCreateOrgRequest -from .service_create_org_user_request import ServiceCreateOrgUserRequest -from .service_create_terraform_module_component_config_request import ServiceCreateTerraformModuleComponentConfigRequest -from .service_create_terraform_module_component_config_request_env_vars import ( - ServiceCreateTerraformModuleComponentConfigRequestEnvVars, -) -from .service_create_terraform_module_component_config_request_variables import ( - ServiceCreateTerraformModuleComponentConfigRequestVariables, -) -from .service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest -from .service_create_workflow_step_approval_response_request import ServiceCreateWorkflowStepApprovalResponseRequest -from .service_deploy_install_components_request import ServiceDeployInstallComponentsRequest -from .service_deprovision_install_request import ServiceDeprovisionInstallRequest -from .service_deprovision_install_sandbox_request import ServiceDeprovisionInstallSandboxRequest -from .service_force_shutdown_request import ServiceForceShutdownRequest -from .service_forget_install_request import ServiceForgetInstallRequest -from .service_graceful_shutdown_request import ServiceGracefulShutdownRequest -from .service_install_phone_home_request import ServiceInstallPhoneHomeRequest -from .service_mng_shut_down_request import ServiceMngShutDownRequest -from .service_mng_update_request import ServiceMngUpdateRequest -from .service_mng_vm_shut_down_request import ServiceMngVMShutDownRequest -from .service_public_git_vcs_action_workflow_config_request import ServicePublicGitVCSActionWorkflowConfigRequest -from .service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest -from .service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest -from .service_readme import ServiceReadme -from .service_remove_org_user_request import ServiceRemoveOrgUserRequest -from .service_rendered_installer import ServiceRenderedInstaller -from .service_reprovision_install_request import ServiceReprovisionInstallRequest -from .service_reprovision_install_sandbox_request import ServiceReprovisionInstallSandboxRequest -from .service_retry_workflow_by_id_request import ServiceRetryWorkflowByIDRequest -from .service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse -from .service_retry_workflow_request import ServiceRetryWorkflowRequest -from .service_retry_workflow_response import ServiceRetryWorkflowResponse -from .service_runner_connection_status import ServiceRunnerConnectionStatus -from .service_sync_secrets_request import ServiceSyncSecretsRequest -from .service_teardown_install_component_request import ServiceTeardownInstallComponentRequest -from .service_teardown_install_components_request import ServiceTeardownInstallComponentsRequest -from .service_update_action_workflow_request import ServiceUpdateActionWorkflowRequest -from .service_update_app_config_installs_request import ServiceUpdateAppConfigInstallsRequest -from .service_update_app_config_request import ServiceUpdateAppConfigRequest -from .service_update_app_request import ServiceUpdateAppRequest -from .service_update_component_request import ServiceUpdateComponentRequest -from .service_update_install_config_request import ServiceUpdateInstallConfigRequest -from .service_update_install_inputs_request import ServiceUpdateInstallInputsRequest -from .service_update_install_inputs_request_inputs import ServiceUpdateInstallInputsRequestInputs -from .service_update_install_request import ServiceUpdateInstallRequest -from .service_update_installer_request import ServiceUpdateInstallerRequest -from .service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata -from .service_update_org_request import ServiceUpdateOrgRequest -from .service_update_runner_settings_request import ServiceUpdateRunnerSettingsRequest -from .service_update_workflow_request import ServiceUpdateWorkflowRequest -from .service_waitlist_request import ServiceWaitlistRequest -from .state_action_workflow_state import StateActionWorkflowState -from .state_action_workflow_state_outputs import StateActionWorkflowStateOutputs -from .state_actions_state import StateActionsState -from .state_actions_state_workflows import StateActionsStateWorkflows -from .state_app_state import StateAppState -from .state_app_state_secrets import StateAppStateSecrets -from .state_aws_cloud_account import StateAWSCloudAccount -from .state_azure_cloud_account import StateAzureCloudAccount -from .state_cloud_account import StateCloudAccount -from .state_domain_state import StateDomainState -from .state_inputs_state import StateInputsState -from .state_inputs_state_inputs import StateInputsStateInputs -from .state_install_stack_state import StateInstallStackState -from .state_install_stack_state_outputs import StateInstallStackStateOutputs -from .state_install_state import StateInstallState -from .state_install_state_inputs import StateInstallStateInputs -from .state_org_state import StateOrgState -from .state_runner_state import StateRunnerState -from .state_sandbox_state import StateSandboxState -from .state_sandbox_state_outputs import StateSandboxStateOutputs -from .state_secrets_state import StateSecretsState -from .stderr_err_response import StderrErrResponse -from .types_string_bool_map import TypesStringBoolMap -from .unlock_terraform_workspace_body import UnlockTerraformWorkspaceBody -from .update_terraform_state_body import UpdateTerraformStateBody - -__all__ = ( - "AppAccount", - "AppAccountType", - "AppActionWorkflow", - "AppActionWorkflowConfig", - "AppActionWorkflowStepConfig", - "AppActionWorkflowStepConfigEnvVars", - "AppActionWorkflowTriggerConfig", - "AppActionWorkflowTriggerType", - "AppApp", - "AppAppAWSIAMPolicyConfig", - "AppAppAWSIAMRoleConfig", - "AppAppBranch", - "AppAppBreakGlassConfig", - "AppAppConfig", - "AppAppConfigStatus", - "AppAppConfigVersion", - "AppAppInput", - "AppAppInputConfig", - "AppAppInputGroup", - "AppAppLinks", - "AppAppPermissionsConfig", - "AppAppPoliciesConfig", - "AppAppRunnerConfig", - "AppAppRunnerConfigEnvVars", - "AppAppRunnerConfigHelmDriverType", - "AppAppRunnerType", - "AppAppSandboxConfig", - "AppAppSandboxConfigEnvVars", - "AppAppSandboxConfigVariables", - "AppAppSecret", - "AppAppSecretConfig", - "AppAppSecretsConfig", - "AppAppStackConfig", - "AppAWSAccount", - "AppAWSECRImageConfig", - "AppAWSIAMRoleType", - "AppAWSStackOutputs", - "AppAzureAccount", - "AppAzureStackOutputs", - "AppCloudPlatform", - "AppCloudPlatformRegion", - "AppComponent", - "AppComponentBuild", - "AppComponentBuildStatus", - "AppComponentConfigConnection", - "AppComponentLinks", - "AppComponentRelease", - "AppComponentReleaseStep", - "AppComponentType", - "AppCompositeStatus", - "AppCompositeStatusMetadata", - "AppConnectedGithubVCSConfig", - "AppDockerBuildComponentConfig", - "AppDockerBuildComponentConfigEnvVars", - "AppExternalImageComponentConfig", - "AppHelmChart", - "AppHelmComponentConfig", - "AppHelmComponentConfigValues", - "AppHelmConfig", - "AppHelmConfigValues", - "AppHelmRelease", - "AppInstall", - "AppInstallActionWorkflow", - "AppInstallActionWorkflowRun", - "AppInstallActionWorkflowRunOutputs", - "AppInstallActionWorkflowRunRunEnvVars", - "AppInstallActionWorkflowRunStep", - "AppInstallActionWorkflowRunStepStatus", - "AppInstallApprovalOption", - "AppInstallAuditLog", - "AppInstallComponent", - "AppInstallComponentLinks", - "AppInstallComponentStatuses", - "AppInstallComponentSummary", - "AppInstallConfig", - "AppInstallDeploy", - "AppInstallDeployOutputs", - "AppInstallDeployStatus", - "AppInstallDeployType", - "AppInstaller", - "AppInstallerMetadata", - "AppInstallerType", - "AppInstallEvent", - "AppInstallEventPayload", - "AppInstallInputs", - "AppInstallInputsRedactedValues", - "AppInstallInputsValues", - "AppInstallLinks", - "AppInstallSandbox", - "AppInstallSandboxRun", - "AppInstallSandboxRunOutputs", - "AppInstallStack", - "AppInstallStackOutputs", - "AppInstallStackOutputsData", - "AppInstallStackVersion", - "AppInstallStackVersionRun", - "AppInstallStackVersionRunData", - "AppInstallState", - "AppJobComponentConfig", - "AppJobComponentConfigEnvVars", - "AppJSONMap", - "AppKubernetesManifestComponentConfig", - "AppLogStream", - "AppLogStreamAttrs", - "AppNotificationsConfig", - "AppOCIArtifact", - "AppOCIArtifactAnnotations", - "AppOperationStatus", - "AppOrg", - "AppOrgInvite", - "AppOrgInviteStatus", - "AppOrgLinks", - "AppOtelLogRecord", - "AppOtelLogRecordLogAttributes", - "AppOtelLogRecordResourceAttributes", - "AppOtelLogRecordScopeAttributes", - "AppPolicy", - "AppPolicyName", - "AppPolicyPermissions", - "AppPublicGitVCSConfig", - "AppRole", - "AppRoleType", - "AppRunner", - "AppRunnerGroup", - "AppRunnerGroupSettings", - "AppRunnerGroupSettingsAwsTags", - "AppRunnerGroupSettingsMetadata", - "AppRunnerGroupType", - "AppRunnerHealthCheck", - "AppRunnerHeartBeat", - "AppRunnerJob", - "AppRunnerJobExecution", - "AppRunnerJobExecutionOutputs", - "AppRunnerJobExecutionOutputsOutputs", - "AppRunnerJobExecutionOutputsOutputsAdditionalProperty", - "AppRunnerJobExecutionResult", - "AppRunnerJobExecutionResultErrorMetadata", - "AppRunnerJobExecutionStatus", - "AppRunnerJobGroup", - "AppRunnerJobMetadata", - "AppRunnerJobOperationType", - "AppRunnerJobOutputs", - "AppRunnerJobStatus", - "AppRunnerJobType", - "AppRunnerOperation", - "AppRunnerOperationType", - "AppRunnerStatus", - "AppSandboxRunType", - "AppStackType", - "AppStatus", - "AppStepErrorBehavior", - "AppTerraformLock", - "AppTerraformModuleComponentConfig", - "AppTerraformModuleComponentConfigEnvVars", - "AppTerraformModuleComponentConfigVariables", - "AppTerraformStateInstance", - "AppTerraformStateInstanceAttributes", - "AppTerraformStateResource", - "AppTerraformWorkspace", - "AppTerraformWorkspaceLock", - "AppTerraformWorkspaceState", - "AppTerraformWorkspaceStateJSON", - "AppVCSConnection", - "AppVCSConnectionCommit", - "AppWaitlist", - "AppWorkflow", - "AppWorkflowLinks", - "AppWorkflowMetadata", - "AppWorkflowStep", - "AppWorkflowStepApproval", - "AppWorkflowStepApprovalResponse", - "AppWorkflowStepApprovalType", - "AppWorkflowStepExecutionType", - "AppWorkflowStepLinks", - "AppWorkflowStepMetadata", - "AppWorkflowStepPolicyValidation", - "AppWorkflowStepResponseType", - "AppWorkflowType", - "ConfigAppPolicyType", - "GetAppConfigTemplateType", - "GetConfigSchemaResponse200", - "GetInstallComponentOutputsResponse200", - "GetTerraformWorkspaceStateJSONResourcesResponse200", - "GetTerraformWorkspaceStatesJSONByIDResponse200", - "GithubComPowertoolsdevMonoPkgTypesStateState", - "GithubComPowertoolsdevMonoPkgTypesStateStateComponents", - "HelpersCreateInstallConfigParams", - "LockTerraformWorkspaceBody", - "OutputsSecretSyncOutput", - "PermissionsPermission", - "PermissionsSet", - "RefsRef", - "RefsRefType", - "ServiceAppAWSIAMPolicyConfig", - "ServiceAppAWSIAMRoleConfig", - "ServiceAppConfigTemplate", - "ServiceAppConfigTemplateType", - "ServiceAppGroupRequest", - "ServiceAppInputRequest", - "ServiceAppPolicyConfig", - "ServiceAppSecretConfig", - "ServiceAwsECRImageConfigRequest", - "ServiceCancelRunnerJobRequest", - "ServiceCLIConfig", - "ServiceComponentChildren", - "ServiceConnectedGithubVCSActionWorkflowConfigRequest", - "ServiceConnectedGithubVCSConfigRequest", - "ServiceConnectedGithubVCSSandboxConfigRequest", - "ServiceCreateActionWorkflowConfigRequest", - "ServiceCreateActionWorkflowConfigStepRequest", - "ServiceCreateActionWorkflowConfigStepRequestEnvVars", - "ServiceCreateActionWorkflowConfigTriggerRequest", - "ServiceCreateAppActionWorkflowRequest", - "ServiceCreateAppBranchRequest", - "ServiceCreateAppBreakGlassConfigRequest", - "ServiceCreateAppConfigRequest", - "ServiceCreateAppInputConfigRequest", - "ServiceCreateAppInputConfigRequestGroups", - "ServiceCreateAppInputConfigRequestInputs", - "ServiceCreateAppPermissionsConfigRequest", - "ServiceCreateAppPoliciesConfigRequest", - "ServiceCreateAppRequest", - "ServiceCreateAppRunnerConfigRequest", - "ServiceCreateAppRunnerConfigRequestEnvVars", - "ServiceCreateAppSandboxConfigRequest", - "ServiceCreateAppSandboxConfigRequestEnvVars", - "ServiceCreateAppSandboxConfigRequestVariables", - "ServiceCreateAppSecretRequest", - "ServiceCreateAppSecretsConfigRequest", - "ServiceCreateAppStackConfigRequest", - "ServiceCreateComponentBuildRequest", - "ServiceCreateComponentReleaseRequest", - "ServiceCreateComponentReleaseRequestStrategy", - "ServiceCreateComponentRequest", - "ServiceCreateConnectionCallbackRequest", - "ServiceCreateConnectionRequest", - "ServiceCreateDockerBuildComponentConfigRequest", - "ServiceCreateDockerBuildComponentConfigRequestEnvVars", - "ServiceCreateExternalImageComponentConfigRequest", - "ServiceCreateHelmComponentConfigRequest", - "ServiceCreateHelmComponentConfigRequestValues", - "ServiceCreateInstallActionWorkflowRunRequest", - "ServiceCreateInstallActionWorkflowRunRequestRunEnvVars", - "ServiceCreateInstallConfigRequest", - "ServiceCreateInstallDeployRequest", - "ServiceCreateInstallerRequest", - "ServiceCreateInstallerRequestMetadata", - "ServiceCreateInstallInputsRequest", - "ServiceCreateInstallInputsRequestInputs", - "ServiceCreateInstallRequest", - "ServiceCreateInstallRequestAwsAccount", - "ServiceCreateInstallRequestAzureAccount", - "ServiceCreateInstallRequestInputs", - "ServiceCreateJobComponentConfigRequest", - "ServiceCreateJobComponentConfigRequestEnvVars", - "ServiceCreateKubernetesManifestComponentConfigRequest", - "ServiceCreateOrgInviteRequest", - "ServiceCreateOrgRequest", - "ServiceCreateOrgUserRequest", - "ServiceCreateTerraformModuleComponentConfigRequest", - "ServiceCreateTerraformModuleComponentConfigRequestEnvVars", - "ServiceCreateTerraformModuleComponentConfigRequestVariables", - "ServiceCreateTerraformWorkspaceRequest", - "ServiceCreateWorkflowStepApprovalResponseRequest", - "ServiceDeployInstallComponentsRequest", - "ServiceDeprovisionInstallRequest", - "ServiceDeprovisionInstallSandboxRequest", - "ServiceForceShutdownRequest", - "ServiceForgetInstallRequest", - "ServiceGracefulShutdownRequest", - "ServiceInstallPhoneHomeRequest", - "ServiceMngShutDownRequest", - "ServiceMngUpdateRequest", - "ServiceMngVMShutDownRequest", - "ServicePublicGitVCSActionWorkflowConfigRequest", - "ServicePublicGitVCSConfigRequest", - "ServicePublicGitVCSSandboxConfigRequest", - "ServiceReadme", - "ServiceRemoveOrgUserRequest", - "ServiceRenderedInstaller", - "ServiceReprovisionInstallRequest", - "ServiceReprovisionInstallSandboxRequest", - "ServiceRetryWorkflowByIDRequest", - "ServiceRetryWorkflowByIDResponse", - "ServiceRetryWorkflowRequest", - "ServiceRetryWorkflowResponse", - "ServiceRunnerConnectionStatus", - "ServiceSyncSecretsRequest", - "ServiceTeardownInstallComponentRequest", - "ServiceTeardownInstallComponentsRequest", - "ServiceUpdateActionWorkflowRequest", - "ServiceUpdateAppConfigInstallsRequest", - "ServiceUpdateAppConfigRequest", - "ServiceUpdateAppRequest", - "ServiceUpdateComponentRequest", - "ServiceUpdateInstallConfigRequest", - "ServiceUpdateInstallerRequest", - "ServiceUpdateInstallerRequestMetadata", - "ServiceUpdateInstallInputsRequest", - "ServiceUpdateInstallInputsRequestInputs", - "ServiceUpdateInstallRequest", - "ServiceUpdateOrgRequest", - "ServiceUpdateRunnerSettingsRequest", - "ServiceUpdateWorkflowRequest", - "ServiceWaitlistRequest", - "StateActionsState", - "StateActionsStateWorkflows", - "StateActionWorkflowState", - "StateActionWorkflowStateOutputs", - "StateAppState", - "StateAppStateSecrets", - "StateAWSCloudAccount", - "StateAzureCloudAccount", - "StateCloudAccount", - "StateDomainState", - "StateInputsState", - "StateInputsStateInputs", - "StateInstallStackState", - "StateInstallStackStateOutputs", - "StateInstallState", - "StateInstallStateInputs", - "StateOrgState", - "StateRunnerState", - "StateSandboxState", - "StateSandboxStateOutputs", - "StateSecretsState", - "StderrErrResponse", - "TypesStringBoolMap", - "UnlockTerraformWorkspaceBody", - "UpdateTerraformStateBody", -) diff --git a/nuon/models/app_account.py b/nuon/models/app_account.py deleted file mode 100644 index b00e72d4..00000000 --- a/nuon/models/app_account.py +++ /dev/null @@ -1,166 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_account_type import AppAccountType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_role import AppRole - from ..models.permissions_set import PermissionsSet - - -T = TypeVar("T", bound="AppAccount") - - -@_attrs_define -class AppAccount: - """ - Attributes: - account_type (Union[Unset, AppAccountType]): - created_at (Union[Unset, str]): - email (Union[Unset, str]): - id (Union[Unset, str]): - org_ids (Union[Unset, list[str]]): ReadOnly Fields - permissions (Union[Unset, PermissionsSet]): - roles (Union[Unset, list['AppRole']]): - subject (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - account_type: Union[Unset, AppAccountType] = UNSET - created_at: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_ids: Union[Unset, list[str]] = UNSET - permissions: Union[Unset, "PermissionsSet"] = UNSET - roles: Union[Unset, list["AppRole"]] = UNSET - subject: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - account_type: Union[Unset, str] = UNSET - if not isinstance(self.account_type, Unset): - account_type = self.account_type.value - - created_at = self.created_at - - email = self.email - - id = self.id - - org_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.org_ids, Unset): - org_ids = self.org_ids - - permissions: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.permissions, Unset): - permissions = self.permissions.to_dict() - - roles: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.roles, Unset): - roles = [] - for roles_item_data in self.roles: - roles_item = roles_item_data.to_dict() - roles.append(roles_item) - - subject = self.subject - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if account_type is not UNSET: - field_dict["account_type"] = account_type - if created_at is not UNSET: - field_dict["created_at"] = created_at - if email is not UNSET: - field_dict["email"] = email - if id is not UNSET: - field_dict["id"] = id - if org_ids is not UNSET: - field_dict["org_ids"] = org_ids - if permissions is not UNSET: - field_dict["permissions"] = permissions - if roles is not UNSET: - field_dict["roles"] = roles - if subject is not UNSET: - field_dict["subject"] = subject - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_role import AppRole - from ..models.permissions_set import PermissionsSet - - d = dict(src_dict) - _account_type = d.pop("account_type", UNSET) - account_type: Union[Unset, AppAccountType] - if isinstance(_account_type, Unset): - account_type = UNSET - else: - account_type = AppAccountType(_account_type) - - created_at = d.pop("created_at", UNSET) - - email = d.pop("email", UNSET) - - id = d.pop("id", UNSET) - - org_ids = cast(list[str], d.pop("org_ids", UNSET)) - - _permissions = d.pop("permissions", UNSET) - permissions: Union[Unset, PermissionsSet] - if isinstance(_permissions, Unset): - permissions = UNSET - else: - permissions = PermissionsSet.from_dict(_permissions) - - roles = [] - _roles = d.pop("roles", UNSET) - for roles_item_data in _roles or []: - roles_item = AppRole.from_dict(roles_item_data) - - roles.append(roles_item) - - subject = d.pop("subject", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_account = cls( - account_type=account_type, - created_at=created_at, - email=email, - id=id, - org_ids=org_ids, - permissions=permissions, - roles=roles, - subject=subject, - updated_at=updated_at, - ) - - app_account.additional_properties = d - return app_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_account_type.py b/nuon/models/app_account_type.py deleted file mode 100644 index f9865241..00000000 --- a/nuon/models/app_account_type.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class AppAccountType(str, Enum): - AUTH0 = "auth0" - CANARY = "canary" - INTEGRATION = "integration" - SERVICE = "service" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_action_workflow.py b/nuon/models/app_action_workflow.py deleted file mode 100644 index bd2dc6b8..00000000 --- a/nuon/models/app_action_workflow.py +++ /dev/null @@ -1,156 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_action_workflow_config import AppActionWorkflowConfig - - -T = TypeVar("T", bound="AppActionWorkflow") - - -@_attrs_define -class AppActionWorkflow: - """ - Attributes: - app_id (Union[Unset, str]): - config_count (Union[Unset, int]): - configs (Union[Unset, list['AppActionWorkflowConfig']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): metadata - status (Union[Unset, str]): TODO: change to default null after migration & after initial pr - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_id: Union[Unset, str] = UNSET - config_count: Union[Unset, int] = UNSET - configs: Union[Unset, list["AppActionWorkflowConfig"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_id = self.app_id - - config_count = self.config_count - - configs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.configs, Unset): - configs = [] - for configs_item_data in self.configs: - configs_item = configs_item_data.to_dict() - configs.append(configs_item) - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - name = self.name - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_id is not UNSET: - field_dict["app_id"] = app_id - if config_count is not UNSET: - field_dict["config_count"] = config_count - if configs is not UNSET: - field_dict["configs"] = configs - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_action_workflow_config import AppActionWorkflowConfig - - d = dict(src_dict) - app_id = d.pop("app_id", UNSET) - - config_count = d.pop("config_count", UNSET) - - configs = [] - _configs = d.pop("configs", UNSET) - for configs_item_data in _configs or []: - configs_item = AppActionWorkflowConfig.from_dict(configs_item_data) - - configs.append(configs_item) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_action_workflow = cls( - app_id=app_id, - config_count=config_count, - configs=configs, - created_at=created_at, - created_by_id=created_by_id, - id=id, - name=name, - status=status, - status_description=status_description, - updated_at=updated_at, - ) - - app_action_workflow.additional_properties = d - return app_action_workflow - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_config.py b/nuon/models/app_action_workflow_config.py deleted file mode 100644 index e97e81b7..00000000 --- a/nuon/models/app_action_workflow_config.py +++ /dev/null @@ -1,212 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_action_workflow_step_config import AppActionWorkflowStepConfig - from ..models.app_action_workflow_trigger_config import AppActionWorkflowTriggerConfig - from ..models.refs_ref import RefsRef - - -T = TypeVar("T", bound="AppActionWorkflowConfig") - - -@_attrs_define -class AppActionWorkflowConfig: - """ - Attributes: - action_workflow_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - component_dependency_ids (Union[Unset, list[str]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - references (Union[Unset, list[str]]): - refs (Union[Unset, list['RefsRef']]): - steps (Union[Unset, list['AppActionWorkflowStepConfig']]): - timeout (Union[Unset, int]): - triggers (Union[Unset, list['AppActionWorkflowTriggerConfig']]): INFO: if adding new associations here, ensure - they are added to the batch delete activity - updated_at (Union[Unset, str]): - """ - - action_workflow_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - component_dependency_ids: Union[Unset, list[str]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - references: Union[Unset, list[str]] = UNSET - refs: Union[Unset, list["RefsRef"]] = UNSET - steps: Union[Unset, list["AppActionWorkflowStepConfig"]] = UNSET - timeout: Union[Unset, int] = UNSET - triggers: Union[Unset, list["AppActionWorkflowTriggerConfig"]] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_id = self.action_workflow_id - - app_config_id = self.app_config_id - - app_id = self.app_id - - component_dependency_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.component_dependency_ids, Unset): - component_dependency_ids = self.component_dependency_ids - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - refs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.refs, Unset): - refs = [] - for refs_item_data in self.refs: - refs_item = refs_item_data.to_dict() - refs.append(refs_item) - - steps: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.steps, Unset): - steps = [] - for steps_item_data in self.steps: - steps_item = steps_item_data.to_dict() - steps.append(steps_item) - - timeout = self.timeout - - triggers: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.triggers, Unset): - triggers = [] - for triggers_item_data in self.triggers: - triggers_item = triggers_item_data.to_dict() - triggers.append(triggers_item) - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_id is not UNSET: - field_dict["action_workflow_id"] = action_workflow_id - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if component_dependency_ids is not UNSET: - field_dict["component_dependency_ids"] = component_dependency_ids - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if references is not UNSET: - field_dict["references"] = references - if refs is not UNSET: - field_dict["refs"] = refs - if steps is not UNSET: - field_dict["steps"] = steps - if timeout is not UNSET: - field_dict["timeout"] = timeout - if triggers is not UNSET: - field_dict["triggers"] = triggers - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_action_workflow_step_config import AppActionWorkflowStepConfig - from ..models.app_action_workflow_trigger_config import AppActionWorkflowTriggerConfig - from ..models.refs_ref import RefsRef - - d = dict(src_dict) - action_workflow_id = d.pop("action_workflow_id", UNSET) - - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - component_dependency_ids = cast(list[str], d.pop("component_dependency_ids", UNSET)) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - references = cast(list[str], d.pop("references", UNSET)) - - refs = [] - _refs = d.pop("refs", UNSET) - for refs_item_data in _refs or []: - refs_item = RefsRef.from_dict(refs_item_data) - - refs.append(refs_item) - - steps = [] - _steps = d.pop("steps", UNSET) - for steps_item_data in _steps or []: - steps_item = AppActionWorkflowStepConfig.from_dict(steps_item_data) - - steps.append(steps_item) - - timeout = d.pop("timeout", UNSET) - - triggers = [] - _triggers = d.pop("triggers", UNSET) - for triggers_item_data in _triggers or []: - triggers_item = AppActionWorkflowTriggerConfig.from_dict(triggers_item_data) - - triggers.append(triggers_item) - - updated_at = d.pop("updated_at", UNSET) - - app_action_workflow_config = cls( - action_workflow_id=action_workflow_id, - app_config_id=app_config_id, - app_id=app_id, - component_dependency_ids=component_dependency_ids, - created_at=created_at, - created_by_id=created_by_id, - id=id, - references=references, - refs=refs, - steps=steps, - timeout=timeout, - triggers=triggers, - updated_at=updated_at, - ) - - app_action_workflow_config.additional_properties = d - return app_action_workflow_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_step_config.py b/nuon/models/app_action_workflow_step_config.py deleted file mode 100644 index 1fc2ec3e..00000000 --- a/nuon/models/app_action_workflow_step_config.py +++ /dev/null @@ -1,227 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_action_workflow_step_config_env_vars import AppActionWorkflowStepConfigEnvVars - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - -T = TypeVar("T", bound="AppActionWorkflowStepConfig") - - -@_attrs_define -class AppActionWorkflowStepConfig: - """ - Attributes: - action_workflow_config_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): this belongs to an app config id - app_id (Union[Unset, str]): - command (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppActionWorkflowStepConfigEnvVars]): - id (Union[Unset, str]): - idx (Union[Unset, int]): - inline_contents (Union[Unset, str]): - name (Union[Unset, str]): metadata - previous_step_id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - references (Union[Unset, list[str]]): - updated_at (Union[Unset, str]): - """ - - action_workflow_config_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - command: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppActionWorkflowStepConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - idx: Union[Unset, int] = UNSET - inline_contents: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - previous_step_id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - references: Union[Unset, list[str]] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_config_id = self.action_workflow_config_id - - app_config_id = self.app_config_id - - app_id = self.app_id - - command = self.command - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - id = self.id - - idx = self.idx - - inline_contents = self.inline_contents - - name = self.name - - previous_step_id = self.previous_step_id - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_config_id is not UNSET: - field_dict["action_workflow_config_id"] = action_workflow_config_id - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if command is not UNSET: - field_dict["command"] = command - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if id is not UNSET: - field_dict["id"] = id - if idx is not UNSET: - field_dict["idx"] = idx - if inline_contents is not UNSET: - field_dict["inline_contents"] = inline_contents - if name is not UNSET: - field_dict["name"] = name - if previous_step_id is not UNSET: - field_dict["previous_step_id"] = previous_step_id - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if references is not UNSET: - field_dict["references"] = references - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_action_workflow_step_config_env_vars import AppActionWorkflowStepConfigEnvVars - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - d = dict(src_dict) - action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) - - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - command = d.pop("command", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppActionWorkflowStepConfigEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = AppActionWorkflowStepConfigEnvVars.from_dict(_env_vars) - - id = d.pop("id", UNSET) - - idx = d.pop("idx", UNSET) - - inline_contents = d.pop("inline_contents", UNSET) - - name = d.pop("name", UNSET) - - previous_step_id = d.pop("previous_step_id", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) - - references = cast(list[str], d.pop("references", UNSET)) - - updated_at = d.pop("updated_at", UNSET) - - app_action_workflow_step_config = cls( - action_workflow_config_id=action_workflow_config_id, - app_config_id=app_config_id, - app_id=app_id, - command=command, - connected_github_vcs_config=connected_github_vcs_config, - created_at=created_at, - created_by_id=created_by_id, - env_vars=env_vars, - id=id, - idx=idx, - inline_contents=inline_contents, - name=name, - previous_step_id=previous_step_id, - public_git_vcs_config=public_git_vcs_config, - references=references, - updated_at=updated_at, - ) - - app_action_workflow_step_config.additional_properties = d - return app_action_workflow_step_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_step_config_env_vars.py b/nuon/models/app_action_workflow_step_config_env_vars.py deleted file mode 100644 index c11fba66..00000000 --- a/nuon/models/app_action_workflow_step_config_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppActionWorkflowStepConfigEnvVars") - - -@_attrs_define -class AppActionWorkflowStepConfigEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_action_workflow_step_config_env_vars = cls() - - app_action_workflow_step_config_env_vars.additional_properties = d - return app_action_workflow_step_config_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_trigger_config.py b/nuon/models/app_action_workflow_trigger_config.py deleted file mode 100644 index c3790d83..00000000 --- a/nuon/models/app_action_workflow_trigger_config.py +++ /dev/null @@ -1,162 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_component import AppComponent - - -T = TypeVar("T", bound="AppActionWorkflowTriggerConfig") - - -@_attrs_define -class AppActionWorkflowTriggerConfig: - """ - Attributes: - action_workflow_config_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): this belongs to an app config id - app_id (Union[Unset, str]): - component (Union[Unset, AppComponent]): - component_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - cron_schedule (Union[Unset, str]): - id (Union[Unset, str]): - type_ (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - action_workflow_config_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - component: Union[Unset, "AppComponent"] = UNSET - component_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - cron_schedule: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_config_id = self.action_workflow_config_id - - app_config_id = self.app_config_id - - app_id = self.app_id - - component: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.component, Unset): - component = self.component.to_dict() - - component_id = self.component_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - cron_schedule = self.cron_schedule - - id = self.id - - type_ = self.type_ - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_config_id is not UNSET: - field_dict["action_workflow_config_id"] = action_workflow_config_id - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if component is not UNSET: - field_dict["component"] = component - if component_id is not UNSET: - field_dict["component_id"] = component_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if cron_schedule is not UNSET: - field_dict["cron_schedule"] = cron_schedule - if id is not UNSET: - field_dict["id"] = id - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_component import AppComponent - - d = dict(src_dict) - action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) - - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - _component = d.pop("component", UNSET) - component: Union[Unset, AppComponent] - if isinstance(_component, Unset): - component = UNSET - else: - component = AppComponent.from_dict(_component) - - component_id = d.pop("component_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - cron_schedule = d.pop("cron_schedule", UNSET) - - id = d.pop("id", UNSET) - - type_ = d.pop("type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_action_workflow_trigger_config = cls( - action_workflow_config_id=action_workflow_config_id, - app_config_id=app_config_id, - app_id=app_id, - component=component, - component_id=component_id, - created_at=created_at, - created_by_id=created_by_id, - cron_schedule=cron_schedule, - id=id, - type_=type_, - updated_at=updated_at, - ) - - app_action_workflow_trigger_config.additional_properties = d - return app_action_workflow_trigger_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_trigger_type.py b/nuon/models/app_action_workflow_trigger_type.py deleted file mode 100644 index 77f4f668..00000000 --- a/nuon/models/app_action_workflow_trigger_type.py +++ /dev/null @@ -1,31 +0,0 @@ -from enum import Enum - - -class AppActionWorkflowTriggerType(str, Enum): - CRON = "cron" - MANUAL = "manual" - POST_DEPLOY_ALL_COMPONENTS = "post-deploy-all-components" - POST_DEPLOY_COMPONENT = "post-deploy-component" - POST_DEPROVISION = "post-deprovision" - POST_DEPROVISION_SANDBOX = "post-deprovision-sandbox" - POST_PROVISION = "post-provision" - POST_REPROVISION = "post-reprovision" - POST_REPROVISION_SANDBOX = "post-reprovision-sandbox" - POST_SECRETS_SYNC = "post-secrets-sync" - POST_TEARDOWN_ALL_COMPONENTS = "post-teardown-all-components" - POST_TEARDOWN_COMPONENT = "post-teardown-component" - POST_UPDATE_INPUTS = "post-update-inputs" - PRE_DEPLOY_ALL_COMPONENTS = "pre-deploy-all-components" - PRE_DEPLOY_COMPONENT = "pre-deploy-component" - PRE_DEPROVISION = "pre-deprovision" - PRE_DEPROVISION_SANDBOX = "pre-deprovision-sandbox" - PRE_PROVISION = "pre-provision" - PRE_REPROVISION = "pre-reprovision" - PRE_REPROVISION_SANDBOX = "pre-reprovision-sandbox" - PRE_SECRETS_SYNC = "pre-secrets-sync" - PRE_TEARDOWN_ALL_COMPONENTS = "pre-teardown-all-components" - PRE_TEARDOWN_COMPONENT = "pre-teardown-component" - PRE_UPDATE_INPUTS = "pre-update-inputs" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_app.py b/nuon/models/app_app.py deleted file mode 100644 index 8048d0f0..00000000 --- a/nuon/models/app_app.py +++ /dev/null @@ -1,270 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_input_config import AppAppInputConfig - from ..models.app_app_links import AppAppLinks - from ..models.app_app_runner_config import AppAppRunnerConfig - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_notifications_config import AppNotificationsConfig - - -T = TypeVar("T", bound="AppApp") - - -@_attrs_define -class AppApp: - """ - Attributes: - cloud_platform (Union[Unset, str]): - config_directory (Union[Unset, str]): - config_repo (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - input_config (Union[Unset, AppAppInputConfig]): - links (Union[Unset, AppAppLinks]): - name (Union[Unset, str]): - notifications_config (Union[Unset, AppNotificationsConfig]): - org_id (Union[Unset, str]): - runner_config (Union[Unset, AppAppRunnerConfig]): - runner_type (Union[Unset, str]): - sandbox_config (Union[Unset, AppAppSandboxConfig]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - cloud_platform: Union[Unset, str] = UNSET - config_directory: Union[Unset, str] = UNSET - config_repo: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input_config: Union[Unset, "AppAppInputConfig"] = UNSET - links: Union[Unset, "AppAppLinks"] = UNSET - name: Union[Unset, str] = UNSET - notifications_config: Union[Unset, "AppNotificationsConfig"] = UNSET - org_id: Union[Unset, str] = UNSET - runner_config: Union[Unset, "AppAppRunnerConfig"] = UNSET - runner_type: Union[Unset, str] = UNSET - sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - cloud_platform = self.cloud_platform - - config_directory = self.config_directory - - config_repo = self.config_repo - - created_at = self.created_at - - created_by_id = self.created_by_id - - description = self.description - - display_name = self.display_name - - id = self.id - - input_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.input_config, Unset): - input_config = self.input_config.to_dict() - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - name = self.name - - notifications_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.notifications_config, Unset): - notifications_config = self.notifications_config.to_dict() - - org_id = self.org_id - - runner_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_config, Unset): - runner_config = self.runner_config.to_dict() - - runner_type = self.runner_type - - sandbox_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.sandbox_config, Unset): - sandbox_config = self.sandbox_config.to_dict() - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cloud_platform is not UNSET: - field_dict["cloud_platform"] = cloud_platform - if config_directory is not UNSET: - field_dict["config_directory"] = config_directory - if config_repo is not UNSET: - field_dict["config_repo"] = config_repo - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if id is not UNSET: - field_dict["id"] = id - if input_config is not UNSET: - field_dict["input_config"] = input_config - if links is not UNSET: - field_dict["links"] = links - if name is not UNSET: - field_dict["name"] = name - if notifications_config is not UNSET: - field_dict["notifications_config"] = notifications_config - if org_id is not UNSET: - field_dict["org_id"] = org_id - if runner_config is not UNSET: - field_dict["runner_config"] = runner_config - if runner_type is not UNSET: - field_dict["runner_type"] = runner_type - if sandbox_config is not UNSET: - field_dict["sandbox_config"] = sandbox_config - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_input_config import AppAppInputConfig - from ..models.app_app_links import AppAppLinks - from ..models.app_app_runner_config import AppAppRunnerConfig - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_notifications_config import AppNotificationsConfig - - d = dict(src_dict) - cloud_platform = d.pop("cloud_platform", UNSET) - - config_directory = d.pop("config_directory", UNSET) - - config_repo = d.pop("config_repo", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - id = d.pop("id", UNSET) - - _input_config = d.pop("input_config", UNSET) - input_config: Union[Unset, AppAppInputConfig] - if isinstance(_input_config, Unset): - input_config = UNSET - else: - input_config = AppAppInputConfig.from_dict(_input_config) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppAppLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppAppLinks.from_dict(_links) - - name = d.pop("name", UNSET) - - _notifications_config = d.pop("notifications_config", UNSET) - notifications_config: Union[Unset, AppNotificationsConfig] - if isinstance(_notifications_config, Unset): - notifications_config = UNSET - else: - notifications_config = AppNotificationsConfig.from_dict(_notifications_config) - - org_id = d.pop("org_id", UNSET) - - _runner_config = d.pop("runner_config", UNSET) - runner_config: Union[Unset, AppAppRunnerConfig] - if isinstance(_runner_config, Unset): - runner_config = UNSET - else: - runner_config = AppAppRunnerConfig.from_dict(_runner_config) - - runner_type = d.pop("runner_type", UNSET) - - _sandbox_config = d.pop("sandbox_config", UNSET) - sandbox_config: Union[Unset, AppAppSandboxConfig] - if isinstance(_sandbox_config, Unset): - sandbox_config = UNSET - else: - sandbox_config = AppAppSandboxConfig.from_dict(_sandbox_config) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app = cls( - cloud_platform=cloud_platform, - config_directory=config_directory, - config_repo=config_repo, - created_at=created_at, - created_by_id=created_by_id, - description=description, - display_name=display_name, - id=id, - input_config=input_config, - links=links, - name=name, - notifications_config=notifications_config, - org_id=org_id, - runner_config=runner_config, - runner_type=runner_type, - sandbox_config=sandbox_config, - status=status, - status_description=status_description, - updated_at=updated_at, - ) - - app_app.additional_properties = d - return app_app - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_awsiam_policy_config.py b/nuon/models/app_app_awsiam_policy_config.py deleted file mode 100644 index 53ac6bea..00000000 --- a/nuon/models/app_app_awsiam_policy_config.py +++ /dev/null @@ -1,149 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAppAWSIAMPolicyConfig") - - -@_attrs_define -class AppAppAWSIAMPolicyConfig: - """ - Attributes: - app_aws_iam_role_config_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): - cloudformation_stack_name (Union[Unset, str]): - contents (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - managed_policy_name (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_aws_iam_role_config_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - cloudformation_stack_name: Union[Unset, str] = UNSET - contents: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - managed_policy_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_aws_iam_role_config_id = self.app_aws_iam_role_config_id - - app_config_id = self.app_config_id - - cloudformation_stack_name = self.cloudformation_stack_name - - contents = self.contents - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - managed_policy_name = self.managed_policy_name - - name = self.name - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_aws_iam_role_config_id is not UNSET: - field_dict["app_aws_iam_role_config_id"] = app_aws_iam_role_config_id - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if cloudformation_stack_name is not UNSET: - field_dict["cloudformation_stack_name"] = cloudformation_stack_name - if contents is not UNSET: - field_dict["contents"] = contents - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if managed_policy_name is not UNSET: - field_dict["managed_policy_name"] = managed_policy_name - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_aws_iam_role_config_id = d.pop("app_aws_iam_role_config_id", UNSET) - - app_config_id = d.pop("app_config_id", UNSET) - - cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) - - contents = d.pop("contents", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - managed_policy_name = d.pop("managed_policy_name", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_awsiam_policy_config = cls( - app_aws_iam_role_config_id=app_aws_iam_role_config_id, - app_config_id=app_config_id, - cloudformation_stack_name=cloudformation_stack_name, - contents=contents, - created_at=created_at, - created_by_id=created_by_id, - id=id, - managed_policy_name=managed_policy_name, - name=name, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_awsiam_policy_config.additional_properties = d - return app_app_awsiam_policy_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_awsiam_role_config.py b/nuon/models/app_app_awsiam_role_config.py deleted file mode 100644 index f9d84b72..00000000 --- a/nuon/models/app_app_awsiam_role_config.py +++ /dev/null @@ -1,218 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_awsiam_role_type import AppAWSIAMRoleType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_awsiam_policy_config import AppAppAWSIAMPolicyConfig - - -T = TypeVar("T", bound="AppAppAWSIAMRoleConfig") - - -@_attrs_define -class AppAppAWSIAMRoleConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - cloudformation_param_name (Union[Unset, str]): - cloudformation_stack_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - permissions_boundary (Union[Unset, str]): - policies (Union[Unset, list['AppAppAWSIAMPolicyConfig']]): - type_ (Union[Unset, AppAWSIAMRoleType]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - cloudformation_param_name: Union[Unset, str] = UNSET - cloudformation_stack_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - permissions_boundary: Union[Unset, str] = UNSET - policies: Union[Unset, list["AppAppAWSIAMPolicyConfig"]] = UNSET - type_: Union[Unset, AppAWSIAMRoleType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - cloudformation_param_name = self.cloudformation_param_name - - cloudformation_stack_name = self.cloudformation_stack_name - - created_at = self.created_at - - created_by_id = self.created_by_id - - description = self.description - - display_name = self.display_name - - id = self.id - - name = self.name - - org_id = self.org_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - permissions_boundary = self.permissions_boundary - - policies: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.policies, Unset): - policies = [] - for policies_item_data in self.policies: - policies_item = policies_item_data.to_dict() - policies.append(policies_item) - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if cloudformation_param_name is not UNSET: - field_dict["cloudformation_param_name"] = cloudformation_param_name - if cloudformation_stack_name is not UNSET: - field_dict["cloudformation_stack_name"] = cloudformation_stack_name - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if permissions_boundary is not UNSET: - field_dict["permissions_boundary"] = permissions_boundary - if policies is not UNSET: - field_dict["policies"] = policies - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_awsiam_policy_config import AppAppAWSIAMPolicyConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - cloudformation_param_name = d.pop("cloudformation_param_name", UNSET) - - cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - permissions_boundary = d.pop("permissions_boundary", UNSET) - - policies = [] - _policies = d.pop("policies", UNSET) - for policies_item_data in _policies or []: - policies_item = AppAppAWSIAMPolicyConfig.from_dict(policies_item_data) - - policies.append(policies_item) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppAWSIAMRoleType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppAWSIAMRoleType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_app_awsiam_role_config = cls( - app_config_id=app_config_id, - cloudformation_param_name=cloudformation_param_name, - cloudformation_stack_name=cloudformation_stack_name, - created_at=created_at, - created_by_id=created_by_id, - description=description, - display_name=display_name, - id=id, - name=name, - org_id=org_id, - owner_id=owner_id, - owner_type=owner_type, - permissions_boundary=permissions_boundary, - policies=policies, - type_=type_, - updated_at=updated_at, - ) - - app_app_awsiam_role_config.additional_properties = d - return app_app_awsiam_role_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_branch.py b/nuon/models/app_app_branch.py deleted file mode 100644 index 13815906..00000000 --- a/nuon/models/app_app_branch.py +++ /dev/null @@ -1,147 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_workflow import AppWorkflow - - -T = TypeVar("T", bound="AppAppBranch") - - -@_attrs_define -class AppAppBranch: - """ - Attributes: - app_id (Union[Unset, str]): - connected_github_vcs_config_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflows (Union[Unset, list['AppWorkflow']]): - """ - - app_id: Union[Unset, str] = UNSET - connected_github_vcs_config_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflows: Union[Unset, list["AppWorkflow"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_id = self.app_id - - connected_github_vcs_config_id = self.connected_github_vcs_config_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - name = self.name - - org_id = self.org_id - - updated_at = self.updated_at - - workflows: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.workflows, Unset): - workflows = [] - for workflows_item_data in self.workflows: - workflows_item = workflows_item_data.to_dict() - workflows.append(workflows_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_id is not UNSET: - field_dict["app_id"] = app_id - if connected_github_vcs_config_id is not UNSET: - field_dict["connected_github_vcs_config_id"] = connected_github_vcs_config_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflows is not UNSET: - field_dict["workflows"] = workflows - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_workflow import AppWorkflow - - d = dict(src_dict) - app_id = d.pop("app_id", UNSET) - - connected_github_vcs_config_id = d.pop("connected_github_vcs_config_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - workflows = [] - _workflows = d.pop("workflows", UNSET) - for workflows_item_data in _workflows or []: - workflows_item = AppWorkflow.from_dict(workflows_item_data) - - workflows.append(workflows_item) - - app_app_branch = cls( - app_id=app_id, - connected_github_vcs_config_id=connected_github_vcs_config_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - name=name, - org_id=org_id, - updated_at=updated_at, - workflows=workflows, - ) - - app_app_branch.additional_properties = d - return app_app_branch - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_break_glass_config.py b/nuon/models/app_app_break_glass_config.py deleted file mode 100644 index b632a801..00000000 --- a/nuon/models/app_app_break_glass_config.py +++ /dev/null @@ -1,138 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig - - -T = TypeVar("T", bound="AppAppBreakGlassConfig") - - -@_attrs_define -class AppAppBreakGlassConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - aws_iam_roles (Union[Unset, list['AppAppAWSIAMRoleConfig']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - aws_iam_roles: Union[Unset, list["AppAppAWSIAMRoleConfig"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - aws_iam_roles: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.aws_iam_roles, Unset): - aws_iam_roles = [] - for aws_iam_roles_item_data in self.aws_iam_roles: - aws_iam_roles_item = aws_iam_roles_item_data.to_dict() - aws_iam_roles.append(aws_iam_roles_item) - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if aws_iam_roles is not UNSET: - field_dict["aws_iam_roles"] = aws_iam_roles - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - aws_iam_roles = [] - _aws_iam_roles = d.pop("aws_iam_roles", UNSET) - for aws_iam_roles_item_data in _aws_iam_roles or []: - aws_iam_roles_item = AppAppAWSIAMRoleConfig.from_dict(aws_iam_roles_item_data) - - aws_iam_roles.append(aws_iam_roles_item) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_break_glass_config = cls( - app_config_id=app_config_id, - app_id=app_id, - aws_iam_roles=aws_iam_roles, - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_break_glass_config.additional_properties = d - return app_app_break_glass_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_config.py b/nuon/models/app_app_config.py deleted file mode 100644 index 7a4f328a..00000000 --- a/nuon/models/app_app_config.py +++ /dev/null @@ -1,423 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_app_config_status import AppAppConfigStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_action_workflow_config import AppActionWorkflowConfig - from ..models.app_app_branch import AppAppBranch - from ..models.app_app_break_glass_config import AppAppBreakGlassConfig - from ..models.app_app_input_config import AppAppInputConfig - from ..models.app_app_permissions_config import AppAppPermissionsConfig - from ..models.app_app_policies_config import AppAppPoliciesConfig - from ..models.app_app_runner_config import AppAppRunnerConfig - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_app_secrets_config import AppAppSecretsConfig - from ..models.app_app_stack_config import AppAppStackConfig - from ..models.app_component_config_connection import AppComponentConfigConnection - from ..models.app_vcs_connection_commit import AppVCSConnectionCommit - - -T = TypeVar("T", bound="AppAppConfig") - - -@_attrs_define -class AppAppConfig: - """ - Attributes: - action_workflow_configs (Union[Unset, list['AppActionWorkflowConfig']]): - app_branch (Union[Unset, AppAppBranch]): - app_branch_id (Union[Unset, str]): - app_id (Union[Unset, str]): - break_glass (Union[Unset, AppAppBreakGlassConfig]): - checksum (Union[Unset, str]): - cli_version (Union[Unset, str]): - component_config_connections (Union[Unset, list['AppComponentConfigConnection']]): - component_ids (Union[Unset, list[str]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - input_ (Union[Unset, AppAppInputConfig]): - org_id (Union[Unset, str]): - permissions (Union[Unset, AppAppPermissionsConfig]): - policies (Union[Unset, AppAppPoliciesConfig]): - readme (Union[Unset, str]): - runner (Union[Unset, AppAppRunnerConfig]): - sandbox (Union[Unset, AppAppSandboxConfig]): - secrets (Union[Unset, AppAppSecretsConfig]): - stack (Union[Unset, AppAppStackConfig]): - state (Union[Unset, str]): - status (Union[Unset, AppAppConfigStatus]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection_commit (Union[Unset, AppVCSConnectionCommit]): - version (Union[Unset, int]): fields that are filled in via after query or views - """ - - action_workflow_configs: Union[Unset, list["AppActionWorkflowConfig"]] = UNSET - app_branch: Union[Unset, "AppAppBranch"] = UNSET - app_branch_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - break_glass: Union[Unset, "AppAppBreakGlassConfig"] = UNSET - checksum: Union[Unset, str] = UNSET - cli_version: Union[Unset, str] = UNSET - component_config_connections: Union[Unset, list["AppComponentConfigConnection"]] = UNSET - component_ids: Union[Unset, list[str]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input_: Union[Unset, "AppAppInputConfig"] = UNSET - org_id: Union[Unset, str] = UNSET - permissions: Union[Unset, "AppAppPermissionsConfig"] = UNSET - policies: Union[Unset, "AppAppPoliciesConfig"] = UNSET - readme: Union[Unset, str] = UNSET - runner: Union[Unset, "AppAppRunnerConfig"] = UNSET - sandbox: Union[Unset, "AppAppSandboxConfig"] = UNSET - secrets: Union[Unset, "AppAppSecretsConfig"] = UNSET - stack: Union[Unset, "AppAppStackConfig"] = UNSET - state: Union[Unset, str] = UNSET - status: Union[Unset, AppAppConfigStatus] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_commit: Union[Unset, "AppVCSConnectionCommit"] = UNSET - version: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_configs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.action_workflow_configs, Unset): - action_workflow_configs = [] - for action_workflow_configs_item_data in self.action_workflow_configs: - action_workflow_configs_item = action_workflow_configs_item_data.to_dict() - action_workflow_configs.append(action_workflow_configs_item) - - app_branch: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.app_branch, Unset): - app_branch = self.app_branch.to_dict() - - app_branch_id = self.app_branch_id - - app_id = self.app_id - - break_glass: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.break_glass, Unset): - break_glass = self.break_glass.to_dict() - - checksum = self.checksum - - cli_version = self.cli_version - - component_config_connections: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.component_config_connections, Unset): - component_config_connections = [] - for component_config_connections_item_data in self.component_config_connections: - component_config_connections_item = component_config_connections_item_data.to_dict() - component_config_connections.append(component_config_connections_item) - - component_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.component_ids, Unset): - component_ids = self.component_ids - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - input_: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.input_, Unset): - input_ = self.input_.to_dict() - - org_id = self.org_id - - permissions: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.permissions, Unset): - permissions = self.permissions.to_dict() - - policies: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.policies, Unset): - policies = self.policies.to_dict() - - readme = self.readme - - runner: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner, Unset): - runner = self.runner.to_dict() - - sandbox: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.sandbox, Unset): - sandbox = self.sandbox.to_dict() - - secrets: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.secrets, Unset): - secrets = self.secrets.to_dict() - - stack: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.stack, Unset): - stack = self.stack.to_dict() - - state = self.state - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - status_description = self.status_description - - updated_at = self.updated_at - - vcs_connection_commit: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.vcs_connection_commit, Unset): - vcs_connection_commit = self.vcs_connection_commit.to_dict() - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_configs is not UNSET: - field_dict["action_workflow_configs"] = action_workflow_configs - if app_branch is not UNSET: - field_dict["app_branch"] = app_branch - if app_branch_id is not UNSET: - field_dict["app_branch_id"] = app_branch_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if break_glass is not UNSET: - field_dict["break_glass"] = break_glass - if checksum is not UNSET: - field_dict["checksum"] = checksum - if cli_version is not UNSET: - field_dict["cli_version"] = cli_version - if component_config_connections is not UNSET: - field_dict["component_config_connections"] = component_config_connections - if component_ids is not UNSET: - field_dict["component_ids"] = component_ids - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if input_ is not UNSET: - field_dict["input"] = input_ - if org_id is not UNSET: - field_dict["org_id"] = org_id - if permissions is not UNSET: - field_dict["permissions"] = permissions - if policies is not UNSET: - field_dict["policies"] = policies - if readme is not UNSET: - field_dict["readme"] = readme - if runner is not UNSET: - field_dict["runner"] = runner - if sandbox is not UNSET: - field_dict["sandbox"] = sandbox - if secrets is not UNSET: - field_dict["secrets"] = secrets - if stack is not UNSET: - field_dict["stack"] = stack - if state is not UNSET: - field_dict["state"] = state - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vcs_connection_commit is not UNSET: - field_dict["vcs_connection_commit"] = vcs_connection_commit - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_action_workflow_config import AppActionWorkflowConfig - from ..models.app_app_branch import AppAppBranch - from ..models.app_app_break_glass_config import AppAppBreakGlassConfig - from ..models.app_app_input_config import AppAppInputConfig - from ..models.app_app_permissions_config import AppAppPermissionsConfig - from ..models.app_app_policies_config import AppAppPoliciesConfig - from ..models.app_app_runner_config import AppAppRunnerConfig - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_app_secrets_config import AppAppSecretsConfig - from ..models.app_app_stack_config import AppAppStackConfig - from ..models.app_component_config_connection import AppComponentConfigConnection - from ..models.app_vcs_connection_commit import AppVCSConnectionCommit - - d = dict(src_dict) - action_workflow_configs = [] - _action_workflow_configs = d.pop("action_workflow_configs", UNSET) - for action_workflow_configs_item_data in _action_workflow_configs or []: - action_workflow_configs_item = AppActionWorkflowConfig.from_dict(action_workflow_configs_item_data) - - action_workflow_configs.append(action_workflow_configs_item) - - _app_branch = d.pop("app_branch", UNSET) - app_branch: Union[Unset, AppAppBranch] - if isinstance(_app_branch, Unset): - app_branch = UNSET - else: - app_branch = AppAppBranch.from_dict(_app_branch) - - app_branch_id = d.pop("app_branch_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - _break_glass = d.pop("break_glass", UNSET) - break_glass: Union[Unset, AppAppBreakGlassConfig] - if isinstance(_break_glass, Unset): - break_glass = UNSET - else: - break_glass = AppAppBreakGlassConfig.from_dict(_break_glass) - - checksum = d.pop("checksum", UNSET) - - cli_version = d.pop("cli_version", UNSET) - - component_config_connections = [] - _component_config_connections = d.pop("component_config_connections", UNSET) - for component_config_connections_item_data in _component_config_connections or []: - component_config_connections_item = AppComponentConfigConnection.from_dict( - component_config_connections_item_data - ) - - component_config_connections.append(component_config_connections_item) - - component_ids = cast(list[str], d.pop("component_ids", UNSET)) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _input_ = d.pop("input", UNSET) - input_: Union[Unset, AppAppInputConfig] - if isinstance(_input_, Unset): - input_ = UNSET - else: - input_ = AppAppInputConfig.from_dict(_input_) - - org_id = d.pop("org_id", UNSET) - - _permissions = d.pop("permissions", UNSET) - permissions: Union[Unset, AppAppPermissionsConfig] - if isinstance(_permissions, Unset): - permissions = UNSET - else: - permissions = AppAppPermissionsConfig.from_dict(_permissions) - - _policies = d.pop("policies", UNSET) - policies: Union[Unset, AppAppPoliciesConfig] - if isinstance(_policies, Unset): - policies = UNSET - else: - policies = AppAppPoliciesConfig.from_dict(_policies) - - readme = d.pop("readme", UNSET) - - _runner = d.pop("runner", UNSET) - runner: Union[Unset, AppAppRunnerConfig] - if isinstance(_runner, Unset): - runner = UNSET - else: - runner = AppAppRunnerConfig.from_dict(_runner) - - _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, AppAppSandboxConfig] - if isinstance(_sandbox, Unset): - sandbox = UNSET - else: - sandbox = AppAppSandboxConfig.from_dict(_sandbox) - - _secrets = d.pop("secrets", UNSET) - secrets: Union[Unset, AppAppSecretsConfig] - if isinstance(_secrets, Unset): - secrets = UNSET - else: - secrets = AppAppSecretsConfig.from_dict(_secrets) - - _stack = d.pop("stack", UNSET) - stack: Union[Unset, AppAppStackConfig] - if isinstance(_stack, Unset): - stack = UNSET - else: - stack = AppAppStackConfig.from_dict(_stack) - - state = d.pop("state", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppAppConfigStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppAppConfigStatus(_status) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) - vcs_connection_commit: Union[Unset, AppVCSConnectionCommit] - if isinstance(_vcs_connection_commit, Unset): - vcs_connection_commit = UNSET - else: - vcs_connection_commit = AppVCSConnectionCommit.from_dict(_vcs_connection_commit) - - version = d.pop("version", UNSET) - - app_app_config = cls( - action_workflow_configs=action_workflow_configs, - app_branch=app_branch, - app_branch_id=app_branch_id, - app_id=app_id, - break_glass=break_glass, - checksum=checksum, - cli_version=cli_version, - component_config_connections=component_config_connections, - component_ids=component_ids, - created_at=created_at, - created_by_id=created_by_id, - id=id, - input_=input_, - org_id=org_id, - permissions=permissions, - policies=policies, - readme=readme, - runner=runner, - sandbox=sandbox, - secrets=secrets, - stack=stack, - state=state, - status=status, - status_description=status_description, - updated_at=updated_at, - vcs_connection_commit=vcs_connection_commit, - version=version, - ) - - app_app_config.additional_properties = d - return app_app_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_config_status.py b/nuon/models/app_app_config_status.py deleted file mode 100644 index 1185708d..00000000 --- a/nuon/models/app_app_config_status.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppAppConfigStatus(str, Enum): - ACTIVE = "active" - ERROR = "error" - OUTDATED = "outdated" - PENDING = "pending" - SYNCING = "syncing" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_app_config_version.py b/nuon/models/app_app_config_version.py deleted file mode 100644 index 0f979859..00000000 --- a/nuon/models/app_app_config_version.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class AppAppConfigVersion(str, Enum): - V2 = "v2" - VALUE_0 = "" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_app_input.py b/nuon/models/app_app_input.py deleted file mode 100644 index cc3a5161..00000000 --- a/nuon/models/app_app_input.py +++ /dev/null @@ -1,216 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_input_group import AppAppInputGroup - - -T = TypeVar("T", bound="AppAppInput") - - -@_attrs_define -class AppAppInput: - """ - Attributes: - app_input_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - default (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - group (Union[Unset, AppAppInputGroup]): - group_id (Union[Unset, str]): - id (Union[Unset, str]): - index (Union[Unset, int]): - internal (Union[Unset, bool]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - required (Union[Unset, bool]): - sensitive (Union[Unset, bool]): - type_ (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_input_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - default: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - group: Union[Unset, "AppAppInputGroup"] = UNSET - group_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - index: Union[Unset, int] = UNSET - internal: Union[Unset, bool] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - required: Union[Unset, bool] = UNSET - sensitive: Union[Unset, bool] = UNSET - type_: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_input_id = self.app_input_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - default = self.default - - description = self.description - - display_name = self.display_name - - group: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.group, Unset): - group = self.group.to_dict() - - group_id = self.group_id - - id = self.id - - index = self.index - - internal = self.internal - - name = self.name - - org_id = self.org_id - - required = self.required - - sensitive = self.sensitive - - type_ = self.type_ - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_input_id is not UNSET: - field_dict["app_input_id"] = app_input_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if default is not UNSET: - field_dict["default"] = default - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if group is not UNSET: - field_dict["group"] = group - if group_id is not UNSET: - field_dict["group_id"] = group_id - if id is not UNSET: - field_dict["id"] = id - if index is not UNSET: - field_dict["index"] = index - if internal is not UNSET: - field_dict["internal"] = internal - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if required is not UNSET: - field_dict["required"] = required - if sensitive is not UNSET: - field_dict["sensitive"] = sensitive - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_input_group import AppAppInputGroup - - d = dict(src_dict) - app_input_id = d.pop("app_input_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - default = d.pop("default", UNSET) - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - _group = d.pop("group", UNSET) - group: Union[Unset, AppAppInputGroup] - if isinstance(_group, Unset): - group = UNSET - else: - group = AppAppInputGroup.from_dict(_group) - - group_id = d.pop("group_id", UNSET) - - id = d.pop("id", UNSET) - - index = d.pop("index", UNSET) - - internal = d.pop("internal", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - required = d.pop("required", UNSET) - - sensitive = d.pop("sensitive", UNSET) - - type_ = d.pop("type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_input = cls( - app_input_id=app_input_id, - created_at=created_at, - created_by_id=created_by_id, - default=default, - description=description, - display_name=display_name, - group=group, - group_id=group_id, - id=id, - index=index, - internal=internal, - name=name, - org_id=org_id, - required=required, - sensitive=sensitive, - type_=type_, - updated_at=updated_at, - ) - - app_app_input.additional_properties = d - return app_app_input - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_input_config.py b/nuon/models/app_app_input_config.py deleted file mode 100644 index 0f9459f9..00000000 --- a/nuon/models/app_app_input_config.py +++ /dev/null @@ -1,180 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_input import AppAppInput - from ..models.app_app_input_group import AppAppInputGroup - from ..models.app_install_inputs import AppInstallInputs - - -T = TypeVar("T", bound="AppAppInputConfig") - - -@_attrs_define -class AppAppInputConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - input_groups (Union[Unset, list['AppAppInputGroup']]): - inputs (Union[Unset, list['AppAppInput']]): - install_inputs (Union[Unset, list['AppInstallInputs']]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input_groups: Union[Unset, list["AppAppInputGroup"]] = UNSET - inputs: Union[Unset, list["AppAppInput"]] = UNSET - install_inputs: Union[Unset, list["AppInstallInputs"]] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - input_groups: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.input_groups, Unset): - input_groups = [] - for input_groups_item_data in self.input_groups: - input_groups_item = input_groups_item_data.to_dict() - input_groups.append(input_groups_item) - - inputs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.inputs, Unset): - inputs = [] - for inputs_item_data in self.inputs: - inputs_item = inputs_item_data.to_dict() - inputs.append(inputs_item) - - install_inputs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_inputs, Unset): - install_inputs = [] - for install_inputs_item_data in self.install_inputs: - install_inputs_item = install_inputs_item_data.to_dict() - install_inputs.append(install_inputs_item) - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if input_groups is not UNSET: - field_dict["input_groups"] = input_groups - if inputs is not UNSET: - field_dict["inputs"] = inputs - if install_inputs is not UNSET: - field_dict["install_inputs"] = install_inputs - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_input import AppAppInput - from ..models.app_app_input_group import AppAppInputGroup - from ..models.app_install_inputs import AppInstallInputs - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - input_groups = [] - _input_groups = d.pop("input_groups", UNSET) - for input_groups_item_data in _input_groups or []: - input_groups_item = AppAppInputGroup.from_dict(input_groups_item_data) - - input_groups.append(input_groups_item) - - inputs = [] - _inputs = d.pop("inputs", UNSET) - for inputs_item_data in _inputs or []: - inputs_item = AppAppInput.from_dict(inputs_item_data) - - inputs.append(inputs_item) - - install_inputs = [] - _install_inputs = d.pop("install_inputs", UNSET) - for install_inputs_item_data in _install_inputs or []: - install_inputs_item = AppInstallInputs.from_dict(install_inputs_item_data) - - install_inputs.append(install_inputs_item) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_input_config = cls( - app_config_id=app_config_id, - app_id=app_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - input_groups=input_groups, - inputs=inputs, - install_inputs=install_inputs, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_input_config.additional_properties = d - return app_app_input_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_input_group.py b/nuon/models/app_app_input_group.py deleted file mode 100644 index b8997f65..00000000 --- a/nuon/models/app_app_input_group.py +++ /dev/null @@ -1,165 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_input import AppAppInput - - -T = TypeVar("T", bound="AppAppInputGroup") - - -@_attrs_define -class AppAppInputGroup: - """ - Attributes: - app_input_id (Union[Unset, str]): - app_inputs (Union[Unset, list['AppAppInput']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - index (Union[Unset, int]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_input_id: Union[Unset, str] = UNSET - app_inputs: Union[Unset, list["AppAppInput"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - index: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_input_id = self.app_input_id - - app_inputs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.app_inputs, Unset): - app_inputs = [] - for app_inputs_item_data in self.app_inputs: - app_inputs_item = app_inputs_item_data.to_dict() - app_inputs.append(app_inputs_item) - - created_at = self.created_at - - created_by_id = self.created_by_id - - description = self.description - - display_name = self.display_name - - id = self.id - - index = self.index - - name = self.name - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_input_id is not UNSET: - field_dict["app_input_id"] = app_input_id - if app_inputs is not UNSET: - field_dict["app_inputs"] = app_inputs - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if id is not UNSET: - field_dict["id"] = id - if index is not UNSET: - field_dict["index"] = index - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_input import AppAppInput - - d = dict(src_dict) - app_input_id = d.pop("app_input_id", UNSET) - - app_inputs = [] - _app_inputs = d.pop("app_inputs", UNSET) - for app_inputs_item_data in _app_inputs or []: - app_inputs_item = AppAppInput.from_dict(app_inputs_item_data) - - app_inputs.append(app_inputs_item) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - id = d.pop("id", UNSET) - - index = d.pop("index", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_input_group = cls( - app_input_id=app_input_id, - app_inputs=app_inputs, - created_at=created_at, - created_by_id=created_by_id, - description=description, - display_name=display_name, - id=id, - index=index, - name=name, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_input_group.additional_properties = d - return app_app_input_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/nuon/models/app_app_links.py b/nuon/models/app_app_links.py deleted file mode 100644 index ee945edf..00000000 --- a/nuon/models/app_app_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppAppLinks") - - -@_attrs_define -class AppAppLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_app_links = cls() - - app_app_links.additional_properties = d - return app_app_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_permissions_config.py b/nuon/models/app_app_permissions_config.py deleted file mode 100644 index ae0c0fbf..00000000 --- a/nuon/models/app_app_permissions_config.py +++ /dev/null @@ -1,186 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig - - -T = TypeVar("T", bound="AppAppPermissionsConfig") - - -@_attrs_define -class AppAppPermissionsConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - aws_iam_roles (Union[Unset, list['AppAppAWSIAMRoleConfig']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - deprovision_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): - id (Union[Unset, str]): - maintenance_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): - org_id (Union[Unset, str]): - provision_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - aws_iam_roles: Union[Unset, list["AppAppAWSIAMRoleConfig"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - deprovision_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET - id: Union[Unset, str] = UNSET - maintenance_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET - org_id: Union[Unset, str] = UNSET - provision_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - aws_iam_roles: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.aws_iam_roles, Unset): - aws_iam_roles = [] - for aws_iam_roles_item_data in self.aws_iam_roles: - aws_iam_roles_item = aws_iam_roles_item_data.to_dict() - aws_iam_roles.append(aws_iam_roles_item) - - created_at = self.created_at - - created_by_id = self.created_by_id - - deprovision_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.deprovision_aws_iam_role, Unset): - deprovision_aws_iam_role = self.deprovision_aws_iam_role.to_dict() - - id = self.id - - maintenance_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.maintenance_aws_iam_role, Unset): - maintenance_aws_iam_role = self.maintenance_aws_iam_role.to_dict() - - org_id = self.org_id - - provision_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.provision_aws_iam_role, Unset): - provision_aws_iam_role = self.provision_aws_iam_role.to_dict() - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if aws_iam_roles is not UNSET: - field_dict["aws_iam_roles"] = aws_iam_roles - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if deprovision_aws_iam_role is not UNSET: - field_dict["deprovision_aws_iam_role"] = deprovision_aws_iam_role - if id is not UNSET: - field_dict["id"] = id - if maintenance_aws_iam_role is not UNSET: - field_dict["maintenance_aws_iam_role"] = maintenance_aws_iam_role - if org_id is not UNSET: - field_dict["org_id"] = org_id - if provision_aws_iam_role is not UNSET: - field_dict["provision_aws_iam_role"] = provision_aws_iam_role - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - aws_iam_roles = [] - _aws_iam_roles = d.pop("aws_iam_roles", UNSET) - for aws_iam_roles_item_data in _aws_iam_roles or []: - aws_iam_roles_item = AppAppAWSIAMRoleConfig.from_dict(aws_iam_roles_item_data) - - aws_iam_roles.append(aws_iam_roles_item) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _deprovision_aws_iam_role = d.pop("deprovision_aws_iam_role", UNSET) - deprovision_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] - if isinstance(_deprovision_aws_iam_role, Unset): - deprovision_aws_iam_role = UNSET - else: - deprovision_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_deprovision_aws_iam_role) - - id = d.pop("id", UNSET) - - _maintenance_aws_iam_role = d.pop("maintenance_aws_iam_role", UNSET) - maintenance_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] - if isinstance(_maintenance_aws_iam_role, Unset): - maintenance_aws_iam_role = UNSET - else: - maintenance_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_maintenance_aws_iam_role) - - org_id = d.pop("org_id", UNSET) - - _provision_aws_iam_role = d.pop("provision_aws_iam_role", UNSET) - provision_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] - if isinstance(_provision_aws_iam_role, Unset): - provision_aws_iam_role = UNSET - else: - provision_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_provision_aws_iam_role) - - updated_at = d.pop("updated_at", UNSET) - - app_app_permissions_config = cls( - app_config_id=app_config_id, - app_id=app_id, - aws_iam_roles=aws_iam_roles, - created_at=created_at, - created_by_id=created_by_id, - deprovision_aws_iam_role=deprovision_aws_iam_role, - id=id, - maintenance_aws_iam_role=maintenance_aws_iam_role, - org_id=org_id, - provision_aws_iam_role=provision_aws_iam_role, - updated_at=updated_at, - ) - - app_app_permissions_config.additional_properties = d - return app_app_permissions_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_policies_config.py b/nuon/models/app_app_policies_config.py deleted file mode 100644 index e065f49d..00000000 --- a/nuon/models/app_app_policies_config.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAppPoliciesConfig") - - -@_attrs_define -class AppAppPoliciesConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_policies_config = cls( - app_config_id=app_config_id, - app_id=app_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_policies_config.additional_properties = d - return app_app_policies_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_runner_config.py b/nuon/models/app_app_runner_config.py deleted file mode 100644 index 0603a6c2..00000000 --- a/nuon/models/app_app_runner_config.py +++ /dev/null @@ -1,188 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_app_runner_type import AppAppRunnerType -from ..models.app_cloud_platform import AppCloudPlatform -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_runner_config_env_vars import AppAppRunnerConfigEnvVars - - -T = TypeVar("T", bound="AppAppRunnerConfig") - - -@_attrs_define -class AppAppRunnerConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - app_runner_type (Union[Unset, AppAppRunnerType]): - cloud_platform (Union[Unset, AppCloudPlatform]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppAppRunnerConfigEnvVars]): - helm_driver (Union[Unset, str]): - id (Union[Unset, str]): - init_script (Union[Unset, str]): takes a URL to a bash script ⤵ which will be `curl | bash`-ed on the VM. - usually via user-data or equivalent. - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - app_runner_type: Union[Unset, AppAppRunnerType] = UNSET - cloud_platform: Union[Unset, AppCloudPlatform] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppAppRunnerConfigEnvVars"] = UNSET - helm_driver: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - init_script: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - app_runner_type: Union[Unset, str] = UNSET - if not isinstance(self.app_runner_type, Unset): - app_runner_type = self.app_runner_type.value - - cloud_platform: Union[Unset, str] = UNSET - if not isinstance(self.cloud_platform, Unset): - cloud_platform = self.cloud_platform.value - - created_at = self.created_at - - created_by_id = self.created_by_id - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - helm_driver = self.helm_driver - - id = self.id - - init_script = self.init_script - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if app_runner_type is not UNSET: - field_dict["app_runner_type"] = app_runner_type - if cloud_platform is not UNSET: - field_dict["cloud_platform"] = cloud_platform - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if helm_driver is not UNSET: - field_dict["helm_driver"] = helm_driver - if id is not UNSET: - field_dict["id"] = id - if init_script is not UNSET: - field_dict["init_script"] = init_script - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_runner_config_env_vars import AppAppRunnerConfigEnvVars - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - _app_runner_type = d.pop("app_runner_type", UNSET) - app_runner_type: Union[Unset, AppAppRunnerType] - if isinstance(_app_runner_type, Unset): - app_runner_type = UNSET - else: - app_runner_type = AppAppRunnerType(_app_runner_type) - - _cloud_platform = d.pop("cloud_platform", UNSET) - cloud_platform: Union[Unset, AppCloudPlatform] - if isinstance(_cloud_platform, Unset): - cloud_platform = UNSET - else: - cloud_platform = AppCloudPlatform(_cloud_platform) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppAppRunnerConfigEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = AppAppRunnerConfigEnvVars.from_dict(_env_vars) - - helm_driver = d.pop("helm_driver", UNSET) - - id = d.pop("id", UNSET) - - init_script = d.pop("init_script", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_runner_config = cls( - app_config_id=app_config_id, - app_id=app_id, - app_runner_type=app_runner_type, - cloud_platform=cloud_platform, - created_at=created_at, - created_by_id=created_by_id, - env_vars=env_vars, - helm_driver=helm_driver, - id=id, - init_script=init_script, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_runner_config.additional_properties = d - return app_app_runner_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_runner_config_env_vars.py b/nuon/models/app_app_runner_config_env_vars.py deleted file mode 100644 index d03223c0..00000000 --- a/nuon/models/app_app_runner_config_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppAppRunnerConfigEnvVars") - - -@_attrs_define -class AppAppRunnerConfigEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_app_runner_config_env_vars = cls() - - app_app_runner_config_env_vars.additional_properties = d - return app_app_runner_config_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_runner_config_helm_driver_type.py b/nuon/models/app_app_runner_config_helm_driver_type.py deleted file mode 100644 index 1acba890..00000000 --- a/nuon/models/app_app_runner_config_helm_driver_type.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class AppAppRunnerConfigHelmDriverType(str, Enum): - CONFIGMAP = "configmap" - SECRET = "secret" - VALUE_2 = "" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_app_runner_type.py b/nuon/models/app_app_runner_type.py deleted file mode 100644 index 706eabcb..00000000 --- a/nuon/models/app_app_runner_type.py +++ /dev/null @@ -1,15 +0,0 @@ -from enum import Enum - - -class AppAppRunnerType(str, Enum): - AWS = "aws" - AWS_ECS = "aws-ecs" - AWS_EKS = "aws-eks" - AZURE = "azure" - AZURE_ACS = "azure-acs" - AZURE_AKS = "azure-aks" - LOCAL = "local" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_app_sandbox_config.py b/nuon/models/app_app_sandbox_config.py deleted file mode 100644 index 80c12e6b..00000000 --- a/nuon/models/app_app_sandbox_config.py +++ /dev/null @@ -1,227 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_sandbox_config_env_vars import AppAppSandboxConfigEnvVars - from ..models.app_app_sandbox_config_variables import AppAppSandboxConfigVariables - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - -T = TypeVar("T", bound="AppAppSandboxConfig") - - -@_attrs_define -class AppAppSandboxConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - aws_region_type (Union[Unset, str]): cloud specific fields - cloud_platform (Union[Unset, str]): fields set via after query - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppAppSandboxConfigEnvVars]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - terraform_version (Union[Unset, str]): - updated_at (Union[Unset, str]): - variables (Union[Unset, AppAppSandboxConfigVariables]): - variables_files (Union[Unset, list[str]]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - aws_region_type: Union[Unset, str] = UNSET - cloud_platform: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppAppSandboxConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - terraform_version: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - variables: Union[Unset, "AppAppSandboxConfigVariables"] = UNSET - variables_files: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - aws_region_type = self.aws_region_type - - cloud_platform = self.cloud_platform - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - id = self.id - - org_id = self.org_id - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - terraform_version = self.terraform_version - - updated_at = self.updated_at - - variables: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.variables, Unset): - variables = self.variables.to_dict() - - variables_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.variables_files, Unset): - variables_files = self.variables_files - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if aws_region_type is not UNSET: - field_dict["aws_region_type"] = aws_region_type - if cloud_platform is not UNSET: - field_dict["cloud_platform"] = cloud_platform - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if terraform_version is not UNSET: - field_dict["terraform_version"] = terraform_version - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if variables is not UNSET: - field_dict["variables"] = variables - if variables_files is not UNSET: - field_dict["variables_files"] = variables_files - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_sandbox_config_env_vars import AppAppSandboxConfigEnvVars - from ..models.app_app_sandbox_config_variables import AppAppSandboxConfigVariables - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - aws_region_type = d.pop("aws_region_type", UNSET) - - cloud_platform = d.pop("cloud_platform", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppAppSandboxConfigEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = AppAppSandboxConfigEnvVars.from_dict(_env_vars) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) - - terraform_version = d.pop("terraform_version", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - _variables = d.pop("variables", UNSET) - variables: Union[Unset, AppAppSandboxConfigVariables] - if isinstance(_variables, Unset): - variables = UNSET - else: - variables = AppAppSandboxConfigVariables.from_dict(_variables) - - variables_files = cast(list[str], d.pop("variables_files", UNSET)) - - app_app_sandbox_config = cls( - app_config_id=app_config_id, - app_id=app_id, - aws_region_type=aws_region_type, - cloud_platform=cloud_platform, - connected_github_vcs_config=connected_github_vcs_config, - created_at=created_at, - created_by_id=created_by_id, - env_vars=env_vars, - id=id, - org_id=org_id, - public_git_vcs_config=public_git_vcs_config, - terraform_version=terraform_version, - updated_at=updated_at, - variables=variables, - variables_files=variables_files, - ) - - app_app_sandbox_config.additional_properties = d - return app_app_sandbox_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_sandbox_config_env_vars.py b/nuon/models/app_app_sandbox_config_env_vars.py deleted file mode 100644 index 814a5d9e..00000000 --- a/nuon/models/app_app_sandbox_config_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppAppSandboxConfigEnvVars") - - -@_attrs_define -class AppAppSandboxConfigEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_app_sandbox_config_env_vars = cls() - - app_app_sandbox_config_env_vars.additional_properties = d - return app_app_sandbox_config_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_sandbox_config_variables.py b/nuon/models/app_app_sandbox_config_variables.py deleted file mode 100644 index 9b2cb808..00000000 --- a/nuon/models/app_app_sandbox_config_variables.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppAppSandboxConfigVariables") - - -@_attrs_define -class AppAppSandboxConfigVariables: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_app_sandbox_config_variables = cls() - - app_app_sandbox_config_variables.additional_properties = d - return app_app_sandbox_config_variables - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_secret.py b/nuon/models/app_app_secret.py deleted file mode 100644 index 916eb156..00000000 --- a/nuon/models/app_app_secret.py +++ /dev/null @@ -1,122 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAppSecret") - - -@_attrs_define -class AppAppSecret: - """ - Attributes: - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - length (Union[Unset, int]): after query fields - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - length: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_id = self.app_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - length = self.length - - name = self.name - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_id is not UNSET: - field_dict["app_id"] = app_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if length is not UNSET: - field_dict["length"] = length - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_id = d.pop("app_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - length = d.pop("length", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_secret = cls( - app_id=app_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - length=length, - name=name, - org_id=org_id, - updated_at=updated_at, - ) - - app_app_secret.additional_properties = d - return app_app_secret - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_secret_config.py b/nuon/models/app_app_secret_config.py deleted file mode 100644 index 9a509027..00000000 --- a/nuon/models/app_app_secret_config.py +++ /dev/null @@ -1,230 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAppSecretConfig") - - -@_attrs_define -class AppAppSecretConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - app_secrets_config_id (Union[Unset, str]): - auto_generate (Union[Unset, bool]): - cloudformation_param_name (Union[Unset, str]): - cloudformation_stack_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - default (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - format_ (Union[Unset, str]): - id (Union[Unset, str]): - kubernetes_secret_name (Union[Unset, str]): - kubernetes_secret_namespace (Union[Unset, str]): - kubernetes_sync (Union[Unset, bool]): for syncing into kubernetes - name (Union[Unset, str]): - org_id (Union[Unset, str]): - required (Union[Unset, bool]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - app_secrets_config_id: Union[Unset, str] = UNSET - auto_generate: Union[Unset, bool] = UNSET - cloudformation_param_name: Union[Unset, str] = UNSET - cloudformation_stack_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - default: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - format_: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - kubernetes_secret_name: Union[Unset, str] = UNSET - kubernetes_secret_namespace: Union[Unset, str] = UNSET - kubernetes_sync: Union[Unset, bool] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - required: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - app_secrets_config_id = self.app_secrets_config_id - - auto_generate = self.auto_generate - - cloudformation_param_name = self.cloudformation_param_name - - cloudformation_stack_name = self.cloudformation_stack_name - - created_at = self.created_at - - created_by_id = self.created_by_id - - default = self.default - - description = self.description - - display_name = self.display_name - - format_ = self.format_ - - id = self.id - - kubernetes_secret_name = self.kubernetes_secret_name - - kubernetes_secret_namespace = self.kubernetes_secret_namespace - - kubernetes_sync = self.kubernetes_sync - - name = self.name - - org_id = self.org_id - - required = self.required - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if app_secrets_config_id is not UNSET: - field_dict["app_secrets_config_id"] = app_secrets_config_id - if auto_generate is not UNSET: - field_dict["auto_generate"] = auto_generate - if cloudformation_param_name is not UNSET: - field_dict["cloudformation_param_name"] = cloudformation_param_name - if cloudformation_stack_name is not UNSET: - field_dict["cloudformation_stack_name"] = cloudformation_stack_name - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if default is not UNSET: - field_dict["default"] = default - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if format_ is not UNSET: - field_dict["format"] = format_ - if id is not UNSET: - field_dict["id"] = id - if kubernetes_secret_name is not UNSET: - field_dict["kubernetes_secret_name"] = kubernetes_secret_name - if kubernetes_secret_namespace is not UNSET: - field_dict["kubernetes_secret_namespace"] = kubernetes_secret_namespace - if kubernetes_sync is not UNSET: - field_dict["kubernetes_sync"] = kubernetes_sync - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if required is not UNSET: - field_dict["required"] = required - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - app_secrets_config_id = d.pop("app_secrets_config_id", UNSET) - - auto_generate = d.pop("auto_generate", UNSET) - - cloudformation_param_name = d.pop("cloudformation_param_name", UNSET) - - cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - default = d.pop("default", UNSET) - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - format_ = d.pop("format", UNSET) - - id = d.pop("id", UNSET) - - kubernetes_secret_name = d.pop("kubernetes_secret_name", UNSET) - - kubernetes_secret_namespace = d.pop("kubernetes_secret_namespace", UNSET) - - kubernetes_sync = d.pop("kubernetes_sync", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - required = d.pop("required", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_app_secret_config = cls( - app_config_id=app_config_id, - app_id=app_id, - app_secrets_config_id=app_secrets_config_id, - auto_generate=auto_generate, - cloudformation_param_name=cloudformation_param_name, - cloudformation_stack_name=cloudformation_stack_name, - created_at=created_at, - created_by_id=created_by_id, - default=default, - description=description, - display_name=display_name, - format_=format_, - id=id, - kubernetes_secret_name=kubernetes_secret_name, - kubernetes_secret_namespace=kubernetes_secret_namespace, - kubernetes_sync=kubernetes_sync, - name=name, - org_id=org_id, - required=required, - updated_at=updated_at, - ) - - app_app_secret_config.additional_properties = d - return app_app_secret_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_secrets_config.py b/nuon/models/app_app_secrets_config.py deleted file mode 100644 index 0a665de8..00000000 --- a/nuon/models/app_app_secrets_config.py +++ /dev/null @@ -1,138 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_secret_config import AppAppSecretConfig - - -T = TypeVar("T", bound="AppAppSecretsConfig") - - -@_attrs_define -class AppAppSecretsConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - secrets (Union[Unset, list['AppAppSecretConfig']]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - secrets: Union[Unset, list["AppAppSecretConfig"]] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - secrets: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.secrets, Unset): - secrets = [] - for secrets_item_data in self.secrets: - secrets_item = secrets_item_data.to_dict() - secrets.append(secrets_item) - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if secrets is not UNSET: - field_dict["secrets"] = secrets - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_secret_config import AppAppSecretConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - secrets = [] - _secrets = d.pop("secrets", UNSET) - for secrets_item_data in _secrets or []: - secrets_item = AppAppSecretConfig.from_dict(secrets_item_data) - - secrets.append(secrets_item) - - updated_at = d.pop("updated_at", UNSET) - - app_app_secrets_config = cls( - app_config_id=app_config_id, - app_id=app_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - secrets=secrets, - updated_at=updated_at, - ) - - app_app_secrets_config.additional_properties = d - return app_app_secrets_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_app_stack_config.py b/nuon/models/app_app_stack_config.py deleted file mode 100644 index 452a0005..00000000 --- a/nuon/models/app_app_stack_config.py +++ /dev/null @@ -1,166 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_stack_type import AppStackType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAppStackConfig") - - -@_attrs_define -class AppAppStackConfig: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - runner_nested_template_url (Union[Unset, str]): - type_ (Union[Unset, AppStackType]): - updated_at (Union[Unset, str]): - vpc_nested_template_url (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - runner_nested_template_url: Union[Unset, str] = UNSET - type_: Union[Unset, AppStackType] = UNSET - updated_at: Union[Unset, str] = UNSET - vpc_nested_template_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - description = self.description - - id = self.id - - name = self.name - - org_id = self.org_id - - runner_nested_template_url = self.runner_nested_template_url - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - vpc_nested_template_url = self.vpc_nested_template_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if description is not UNSET: - field_dict["description"] = description - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if org_id is not UNSET: - field_dict["org_id"] = org_id - if runner_nested_template_url is not UNSET: - field_dict["runner_nested_template_url"] = runner_nested_template_url - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vpc_nested_template_url is not UNSET: - field_dict["vpc_nested_template_url"] = vpc_nested_template_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - description = d.pop("description", UNSET) - - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - org_id = d.pop("org_id", UNSET) - - runner_nested_template_url = d.pop("runner_nested_template_url", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppStackType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppStackType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - vpc_nested_template_url = d.pop("vpc_nested_template_url", UNSET) - - app_app_stack_config = cls( - app_config_id=app_config_id, - app_id=app_id, - created_at=created_at, - created_by_id=created_by_id, - description=description, - id=id, - name=name, - org_id=org_id, - runner_nested_template_url=runner_nested_template_url, - type_=type_, - updated_at=updated_at, - vpc_nested_template_url=vpc_nested_template_url, - ) - - app_app_stack_config.additional_properties = d - return app_app_stack_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_aws_account.py b/nuon/models/app_aws_account.py deleted file mode 100644 index 2fb97953..00000000 --- a/nuon/models/app_aws_account.py +++ /dev/null @@ -1,104 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAWSAccount") - - -@_attrs_define -class AppAWSAccount: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - iam_role_arn (Union[Unset, str]): - id (Union[Unset, str]): - region (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - iam_role_arn: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - region: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - iam_role_arn = self.iam_role_arn - - id = self.id - - region = self.region - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if iam_role_arn is not UNSET: - field_dict["iam_role_arn"] = iam_role_arn - if id is not UNSET: - field_dict["id"] = id - if region is not UNSET: - field_dict["region"] = region - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - iam_role_arn = d.pop("iam_role_arn", UNSET) - - id = d.pop("id", UNSET) - - region = d.pop("region", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_aws_account = cls( - created_at=created_at, - created_by_id=created_by_id, - iam_role_arn=iam_role_arn, - id=id, - region=region, - updated_at=updated_at, - ) - - app_aws_account.additional_properties = d - return app_aws_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_aws_stack_outputs.py b/nuon/models/app_aws_stack_outputs.py deleted file mode 100644 index bddc09cb..00000000 --- a/nuon/models/app_aws_stack_outputs.py +++ /dev/null @@ -1,144 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAWSStackOutputs") - - -@_attrs_define -class AppAWSStackOutputs: - """ - Attributes: - account_id (Union[Unset, str]): - deprovision_iam_role_arn (Union[Unset, str]): - maintenance_iam_role_arn (Union[Unset, str]): - private_subnets (Union[Unset, list[str]]): - provision_iam_role_arn (Union[Unset, str]): - public_subnets (Union[Unset, list[str]]): - region (Union[Unset, str]): - runner_iam_role_arn (Union[Unset, str]): - runner_subnet (Union[Unset, str]): - vpc_id (Union[Unset, str]): - """ - - account_id: Union[Unset, str] = UNSET - deprovision_iam_role_arn: Union[Unset, str] = UNSET - maintenance_iam_role_arn: Union[Unset, str] = UNSET - private_subnets: Union[Unset, list[str]] = UNSET - provision_iam_role_arn: Union[Unset, str] = UNSET - public_subnets: Union[Unset, list[str]] = UNSET - region: Union[Unset, str] = UNSET - runner_iam_role_arn: Union[Unset, str] = UNSET - runner_subnet: Union[Unset, str] = UNSET - vpc_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - account_id = self.account_id - - deprovision_iam_role_arn = self.deprovision_iam_role_arn - - maintenance_iam_role_arn = self.maintenance_iam_role_arn - - private_subnets: Union[Unset, list[str]] = UNSET - if not isinstance(self.private_subnets, Unset): - private_subnets = self.private_subnets - - provision_iam_role_arn = self.provision_iam_role_arn - - public_subnets: Union[Unset, list[str]] = UNSET - if not isinstance(self.public_subnets, Unset): - public_subnets = self.public_subnets - - region = self.region - - runner_iam_role_arn = self.runner_iam_role_arn - - runner_subnet = self.runner_subnet - - vpc_id = self.vpc_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if account_id is not UNSET: - field_dict["account_id"] = account_id - if deprovision_iam_role_arn is not UNSET: - field_dict["deprovision_iam_role_arn"] = deprovision_iam_role_arn - if maintenance_iam_role_arn is not UNSET: - field_dict["maintenance_iam_role_arn"] = maintenance_iam_role_arn - if private_subnets is not UNSET: - field_dict["private_subnets"] = private_subnets - if provision_iam_role_arn is not UNSET: - field_dict["provision_iam_role_arn"] = provision_iam_role_arn - if public_subnets is not UNSET: - field_dict["public_subnets"] = public_subnets - if region is not UNSET: - field_dict["region"] = region - if runner_iam_role_arn is not UNSET: - field_dict["runner_iam_role_arn"] = runner_iam_role_arn - if runner_subnet is not UNSET: - field_dict["runner_subnet"] = runner_subnet - if vpc_id is not UNSET: - field_dict["vpc_id"] = vpc_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - account_id = d.pop("account_id", UNSET) - - deprovision_iam_role_arn = d.pop("deprovision_iam_role_arn", UNSET) - - maintenance_iam_role_arn = d.pop("maintenance_iam_role_arn", UNSET) - - private_subnets = cast(list[str], d.pop("private_subnets", UNSET)) - - provision_iam_role_arn = d.pop("provision_iam_role_arn", UNSET) - - public_subnets = cast(list[str], d.pop("public_subnets", UNSET)) - - region = d.pop("region", UNSET) - - runner_iam_role_arn = d.pop("runner_iam_role_arn", UNSET) - - runner_subnet = d.pop("runner_subnet", UNSET) - - vpc_id = d.pop("vpc_id", UNSET) - - app_aws_stack_outputs = cls( - account_id=account_id, - deprovision_iam_role_arn=deprovision_iam_role_arn, - maintenance_iam_role_arn=maintenance_iam_role_arn, - private_subnets=private_subnets, - provision_iam_role_arn=provision_iam_role_arn, - public_subnets=public_subnets, - region=region, - runner_iam_role_arn=runner_iam_role_arn, - runner_subnet=runner_subnet, - vpc_id=vpc_id, - ) - - app_aws_stack_outputs.additional_properties = d - return app_aws_stack_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_awsecr_image_config.py b/nuon/models/app_awsecr_image_config.py deleted file mode 100644 index 13a111f7..00000000 --- a/nuon/models/app_awsecr_image_config.py +++ /dev/null @@ -1,122 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAWSECRImageConfig") - - -@_attrs_define -class AppAWSECRImageConfig: - """ - Attributes: - aws_region (Union[Unset, str]): - component_config_id (Union[Unset, str]): connection to parent model - component_config_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - iam_role_arn (Union[Unset, str]): actual configuration - id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - aws_region: Union[Unset, str] = UNSET - component_config_id: Union[Unset, str] = UNSET - component_config_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - iam_role_arn: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_region = self.aws_region - - component_config_id = self.component_config_id - - component_config_type = self.component_config_type - - created_at = self.created_at - - created_by_id = self.created_by_id - - iam_role_arn = self.iam_role_arn - - id = self.id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws_region is not UNSET: - field_dict["aws_region"] = aws_region - if component_config_id is not UNSET: - field_dict["component_config_id"] = component_config_id - if component_config_type is not UNSET: - field_dict["component_config_type"] = component_config_type - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if iam_role_arn is not UNSET: - field_dict["iam_role_arn"] = iam_role_arn - if id is not UNSET: - field_dict["id"] = id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - aws_region = d.pop("aws_region", UNSET) - - component_config_id = d.pop("component_config_id", UNSET) - - component_config_type = d.pop("component_config_type", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - iam_role_arn = d.pop("iam_role_arn", UNSET) - - id = d.pop("id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_awsecr_image_config = cls( - aws_region=aws_region, - component_config_id=component_config_id, - component_config_type=component_config_type, - created_at=created_at, - created_by_id=created_by_id, - iam_role_arn=iam_role_arn, - id=id, - updated_at=updated_at, - ) - - app_awsecr_image_config.additional_properties = d - return app_awsecr_image_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_awsiam_role_type.py b/nuon/models/app_awsiam_role_type.py deleted file mode 100644 index 5a94d092..00000000 --- a/nuon/models/app_awsiam_role_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppAWSIAMRoleType(str, Enum): - BREAKGLASS = "breakglass" - RUNNER_BREAKGLASS = "runner_breakglass" - RUNNER_DEPROVISION = "runner_deprovision" - RUNNER_MAINTENANCE = "runner_maintenance" - RUNNER_PROVISION = "runner_provision" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_azure_account.py b/nuon/models/app_azure_account.py deleted file mode 100644 index 61d5d03b..00000000 --- a/nuon/models/app_azure_account.py +++ /dev/null @@ -1,131 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAzureAccount") - - -@_attrs_define -class AppAzureAccount: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - location (Union[Unset, str]): - service_principal_app_id (Union[Unset, str]): - service_principal_password (Union[Unset, str]): - subscription_id (Union[Unset, str]): - subscription_tenant_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - location: Union[Unset, str] = UNSET - service_principal_app_id: Union[Unset, str] = UNSET - service_principal_password: Union[Unset, str] = UNSET - subscription_id: Union[Unset, str] = UNSET - subscription_tenant_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - location = self.location - - service_principal_app_id = self.service_principal_app_id - - service_principal_password = self.service_principal_password - - subscription_id = self.subscription_id - - subscription_tenant_id = self.subscription_tenant_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if location is not UNSET: - field_dict["location"] = location - if service_principal_app_id is not UNSET: - field_dict["service_principal_app_id"] = service_principal_app_id - if service_principal_password is not UNSET: - field_dict["service_principal_password"] = service_principal_password - if subscription_id is not UNSET: - field_dict["subscription_id"] = subscription_id - if subscription_tenant_id is not UNSET: - field_dict["subscription_tenant_id"] = subscription_tenant_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - location = d.pop("location", UNSET) - - service_principal_app_id = d.pop("service_principal_app_id", UNSET) - - service_principal_password = d.pop("service_principal_password", UNSET) - - subscription_id = d.pop("subscription_id", UNSET) - - subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_azure_account = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - location=location, - service_principal_app_id=service_principal_app_id, - service_principal_password=service_principal_password, - subscription_id=subscription_id, - subscription_tenant_id=subscription_tenant_id, - updated_at=updated_at, - ) - - app_azure_account.additional_properties = d - return app_azure_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_azure_stack_outputs.py b/nuon/models/app_azure_stack_outputs.py deleted file mode 100644 index 5dacd8c5..00000000 --- a/nuon/models/app_azure_stack_outputs.py +++ /dev/null @@ -1,175 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppAzureStackOutputs") - - -@_attrs_define -class AppAzureStackOutputs: - """ - Attributes: - key_vault_id (Union[Unset, str]): - key_vault_name (Union[Unset, str]): - network_id (Union[Unset, str]): - network_name (Union[Unset, str]): - private_subnet_ids (Union[Unset, list[str]]): - private_subnet_names (Union[Unset, list[str]]): - public_subnet_ids (Union[Unset, list[str]]): - public_subnet_names (Union[Unset, list[str]]): - resource_group_id (Union[Unset, str]): - resource_group_location (Union[Unset, str]): - resource_group_name (Union[Unset, str]): - subscription_id (Union[Unset, str]): - subscription_tenant_id (Union[Unset, str]): - """ - - key_vault_id: Union[Unset, str] = UNSET - key_vault_name: Union[Unset, str] = UNSET - network_id: Union[Unset, str] = UNSET - network_name: Union[Unset, str] = UNSET - private_subnet_ids: Union[Unset, list[str]] = UNSET - private_subnet_names: Union[Unset, list[str]] = UNSET - public_subnet_ids: Union[Unset, list[str]] = UNSET - public_subnet_names: Union[Unset, list[str]] = UNSET - resource_group_id: Union[Unset, str] = UNSET - resource_group_location: Union[Unset, str] = UNSET - resource_group_name: Union[Unset, str] = UNSET - subscription_id: Union[Unset, str] = UNSET - subscription_tenant_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - key_vault_id = self.key_vault_id - - key_vault_name = self.key_vault_name - - network_id = self.network_id - - network_name = self.network_name - - private_subnet_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.private_subnet_ids, Unset): - private_subnet_ids = self.private_subnet_ids - - private_subnet_names: Union[Unset, list[str]] = UNSET - if not isinstance(self.private_subnet_names, Unset): - private_subnet_names = self.private_subnet_names - - public_subnet_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.public_subnet_ids, Unset): - public_subnet_ids = self.public_subnet_ids - - public_subnet_names: Union[Unset, list[str]] = UNSET - if not isinstance(self.public_subnet_names, Unset): - public_subnet_names = self.public_subnet_names - - resource_group_id = self.resource_group_id - - resource_group_location = self.resource_group_location - - resource_group_name = self.resource_group_name - - subscription_id = self.subscription_id - - subscription_tenant_id = self.subscription_tenant_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if key_vault_id is not UNSET: - field_dict["key_vault_id"] = key_vault_id - if key_vault_name is not UNSET: - field_dict["key_vault_name"] = key_vault_name - if network_id is not UNSET: - field_dict["network_id"] = network_id - if network_name is not UNSET: - field_dict["network_name"] = network_name - if private_subnet_ids is not UNSET: - field_dict["private_subnet_ids"] = private_subnet_ids - if private_subnet_names is not UNSET: - field_dict["private_subnet_names"] = private_subnet_names - if public_subnet_ids is not UNSET: - field_dict["public_subnet_ids"] = public_subnet_ids - if public_subnet_names is not UNSET: - field_dict["public_subnet_names"] = public_subnet_names - if resource_group_id is not UNSET: - field_dict["resource_group_id"] = resource_group_id - if resource_group_location is not UNSET: - field_dict["resource_group_location"] = resource_group_location - if resource_group_name is not UNSET: - field_dict["resource_group_name"] = resource_group_name - if subscription_id is not UNSET: - field_dict["subscription_id"] = subscription_id - if subscription_tenant_id is not UNSET: - field_dict["subscription_tenant_id"] = subscription_tenant_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - key_vault_id = d.pop("key_vault_id", UNSET) - - key_vault_name = d.pop("key_vault_name", UNSET) - - network_id = d.pop("network_id", UNSET) - - network_name = d.pop("network_name", UNSET) - - private_subnet_ids = cast(list[str], d.pop("private_subnet_ids", UNSET)) - - private_subnet_names = cast(list[str], d.pop("private_subnet_names", UNSET)) - - public_subnet_ids = cast(list[str], d.pop("public_subnet_ids", UNSET)) - - public_subnet_names = cast(list[str], d.pop("public_subnet_names", UNSET)) - - resource_group_id = d.pop("resource_group_id", UNSET) - - resource_group_location = d.pop("resource_group_location", UNSET) - - resource_group_name = d.pop("resource_group_name", UNSET) - - subscription_id = d.pop("subscription_id", UNSET) - - subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) - - app_azure_stack_outputs = cls( - key_vault_id=key_vault_id, - key_vault_name=key_vault_name, - network_id=network_id, - network_name=network_name, - private_subnet_ids=private_subnet_ids, - private_subnet_names=private_subnet_names, - public_subnet_ids=public_subnet_ids, - public_subnet_names=public_subnet_names, - resource_group_id=resource_group_id, - resource_group_location=resource_group_location, - resource_group_name=resource_group_name, - subscription_id=subscription_id, - subscription_tenant_id=subscription_tenant_id, - ) - - app_azure_stack_outputs.additional_properties = d - return app_azure_stack_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_cloud_platform.py b/nuon/models/app_cloud_platform.py deleted file mode 100644 index 7ebb2ab4..00000000 --- a/nuon/models/app_cloud_platform.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class AppCloudPlatform(str, Enum): - AWS = "aws" - AZURE = "azure" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_cloud_platform_region.py b/nuon/models/app_cloud_platform_region.py deleted file mode 100644 index 29c5696c..00000000 --- a/nuon/models/app_cloud_platform_region.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppCloudPlatformRegion") - - -@_attrs_define -class AppCloudPlatformRegion: - """ - Attributes: - display_name (Union[Unset, str]): - icon (Union[Unset, str]): - name (Union[Unset, str]): - value (Union[Unset, str]): - """ - - display_name: Union[Unset, str] = UNSET - icon: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - value: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - display_name = self.display_name - - icon = self.icon - - name = self.name - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if display_name is not UNSET: - field_dict["display_name"] = display_name - if icon is not UNSET: - field_dict["icon"] = icon - if name is not UNSET: - field_dict["name"] = name - if value is not UNSET: - field_dict["value"] = value - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - display_name = d.pop("display_name", UNSET) - - icon = d.pop("icon", UNSET) - - name = d.pop("name", UNSET) - - value = d.pop("value", UNSET) - - app_cloud_platform_region = cls( - display_name=display_name, - icon=icon, - name=name, - value=value, - ) - - app_cloud_platform_region.additional_properties = d - return app_cloud_platform_region - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component.py b/nuon/models/app_component.py deleted file mode 100644 index 55e6ab11..00000000 --- a/nuon/models/app_component.py +++ /dev/null @@ -1,199 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_component_type import AppComponentType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_component_links import AppComponentLinks - - -T = TypeVar("T", bound="AppComponent") - - -@_attrs_define -class AppComponent: - """ - Attributes: - app_id (Union[Unset, str]): - config_versions (Union[Unset, int]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - dependencies (Union[Unset, list[str]]): - id (Union[Unset, str]): - links (Union[Unset, AppComponentLinks]): - name (Union[Unset, str]): - resolved_var_name (Union[Unset, str]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - type_ (Union[Unset, AppComponentType]): - updated_at (Union[Unset, str]): - var_name (Union[Unset, str]): - """ - - app_id: Union[Unset, str] = UNSET - config_versions: Union[Unset, int] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - id: Union[Unset, str] = UNSET - links: Union[Unset, "AppComponentLinks"] = UNSET - name: Union[Unset, str] = UNSET - resolved_var_name: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - type_: Union[Unset, AppComponentType] = UNSET - updated_at: Union[Unset, str] = UNSET - var_name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_id = self.app_id - - config_versions = self.config_versions - - created_at = self.created_at - - created_by_id = self.created_by_id - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - id = self.id - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - name = self.name - - resolved_var_name = self.resolved_var_name - - status = self.status - - status_description = self.status_description - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - var_name = self.var_name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_id is not UNSET: - field_dict["app_id"] = app_id - if config_versions is not UNSET: - field_dict["config_versions"] = config_versions - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if id is not UNSET: - field_dict["id"] = id - if links is not UNSET: - field_dict["links"] = links - if name is not UNSET: - field_dict["name"] = name - if resolved_var_name is not UNSET: - field_dict["resolved_var_name"] = resolved_var_name - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if var_name is not UNSET: - field_dict["var_name"] = var_name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_component_links import AppComponentLinks - - d = dict(src_dict) - app_id = d.pop("app_id", UNSET) - - config_versions = d.pop("config_versions", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - id = d.pop("id", UNSET) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppComponentLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppComponentLinks.from_dict(_links) - - name = d.pop("name", UNSET) - - resolved_var_name = d.pop("resolved_var_name", UNSET) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppComponentType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppComponentType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - var_name = d.pop("var_name", UNSET) - - app_component = cls( - app_id=app_id, - config_versions=config_versions, - created_at=created_at, - created_by_id=created_by_id, - dependencies=dependencies, - id=id, - links=links, - name=name, - resolved_var_name=resolved_var_name, - status=status, - status_description=status_description, - type_=type_, - updated_at=updated_at, - var_name=var_name, - ) - - app_component.additional_properties = d - return app_component - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component_build.py b/nuon/models/app_component_build.py deleted file mode 100644 index 429a8e47..00000000 --- a/nuon/models/app_component_build.py +++ /dev/null @@ -1,313 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_component_config_connection import AppComponentConfigConnection - from ..models.app_component_release import AppComponentRelease - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_deploy import AppInstallDeploy - from ..models.app_log_stream import AppLogStream - from ..models.app_runner_job import AppRunnerJob - from ..models.app_vcs_connection_commit import AppVCSConnectionCommit - - -T = TypeVar("T", bound="AppComponentBuild") - - -@_attrs_define -class AppComponentBuild: - """ - Attributes: - checksum (Union[Unset, str]): checksum of our intermediate component config - component_config_connection (Union[Unset, AppComponentConfigConnection]): - component_config_connection_id (Union[Unset, str]): DEPRECATED: will retain the field to connect against the - last component config connection that set this build - component_config_version (Union[Unset, int]): - component_id (Union[Unset, str]): Read-only fields set on the object to de-nest data - component_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - git_ref (Union[Unset, str]): - id (Union[Unset, str]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - log_stream (Union[Unset, AppLogStream]): - releases (Union[Unset, list['AppComponentRelease']]): - runner_job (Union[Unset, AppRunnerJob]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - vcs_connection_commit (Union[Unset, AppVCSConnectionCommit]): - """ - - checksum: Union[Unset, str] = UNSET - component_config_connection: Union[Unset, "AppComponentConfigConnection"] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - component_config_version: Union[Unset, int] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - releases: Union[Unset, list["AppComponentRelease"]] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_commit: Union[Unset, "AppVCSConnectionCommit"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - checksum = self.checksum - - component_config_connection: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.component_config_connection, Unset): - component_config_connection = self.component_config_connection.to_dict() - - component_config_connection_id = self.component_config_connection_id - - component_config_version = self.component_config_version - - component_id = self.component_id - - component_name = self.component_name - - created_at = self.created_at - - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_by_id = self.created_by_id - - git_ref = self.git_ref - - id = self.id - - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_deploys, Unset): - install_deploys = [] - for install_deploys_item_data in self.install_deploys: - install_deploys_item = install_deploys_item_data.to_dict() - install_deploys.append(install_deploys_item) - - log_stream: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.log_stream, Unset): - log_stream = self.log_stream.to_dict() - - releases: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.releases, Unset): - releases = [] - for releases_item_data in self.releases: - releases_item = releases_item_data.to_dict() - releases.append(releases_item) - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - status = self.status - - status_description = self.status_description - - status_v2: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status_v2, Unset): - status_v2 = self.status_v2.to_dict() - - updated_at = self.updated_at - - vcs_connection_commit: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.vcs_connection_commit, Unset): - vcs_connection_commit = self.vcs_connection_commit.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if checksum is not UNSET: - field_dict["checksum"] = checksum - if component_config_connection is not UNSET: - field_dict["component_config_connection"] = component_config_connection - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if component_config_version is not UNSET: - field_dict["component_config_version"] = component_config_version - if component_id is not UNSET: - field_dict["component_id"] = component_id - if component_name is not UNSET: - field_dict["component_name"] = component_name - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by is not UNSET: - field_dict["created_by"] = created_by - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if git_ref is not UNSET: - field_dict["git_ref"] = git_ref - if id is not UNSET: - field_dict["id"] = id - if install_deploys is not UNSET: - field_dict["install_deploys"] = install_deploys - if log_stream is not UNSET: - field_dict["log_stream"] = log_stream - if releases is not UNSET: - field_dict["releases"] = releases - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if status_v2 is not UNSET: - field_dict["status_v2"] = status_v2 - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vcs_connection_commit is not UNSET: - field_dict["vcs_connection_commit"] = vcs_connection_commit - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_component_config_connection import AppComponentConfigConnection - from ..models.app_component_release import AppComponentRelease - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_deploy import AppInstallDeploy - from ..models.app_log_stream import AppLogStream - from ..models.app_runner_job import AppRunnerJob - from ..models.app_vcs_connection_commit import AppVCSConnectionCommit - - d = dict(src_dict) - checksum = d.pop("checksum", UNSET) - - _component_config_connection = d.pop("component_config_connection", UNSET) - component_config_connection: Union[Unset, AppComponentConfigConnection] - if isinstance(_component_config_connection, Unset): - component_config_connection = UNSET - else: - component_config_connection = AppComponentConfigConnection.from_dict(_component_config_connection) - - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - component_config_version = d.pop("component_config_version", UNSET) - - component_id = d.pop("component_id", UNSET) - - component_name = d.pop("component_name", UNSET) - - created_at = d.pop("created_at", UNSET) - - _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_by_id = d.pop("created_by_id", UNSET) - - git_ref = d.pop("git_ref", UNSET) - - id = d.pop("id", UNSET) - - install_deploys = [] - _install_deploys = d.pop("install_deploys", UNSET) - for install_deploys_item_data in _install_deploys or []: - install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) - - install_deploys.append(install_deploys_item) - - _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] - if isinstance(_log_stream, Unset): - log_stream = UNSET - else: - log_stream = AppLogStream.from_dict(_log_stream) - - releases = [] - _releases = d.pop("releases", UNSET) - for releases_item_data in _releases or []: - releases_item = AppComponentRelease.from_dict(releases_item_data) - - releases.append(releases_item) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] - if isinstance(_status_v2, Unset): - status_v2 = UNSET - else: - status_v2 = AppCompositeStatus.from_dict(_status_v2) - - updated_at = d.pop("updated_at", UNSET) - - _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) - vcs_connection_commit: Union[Unset, AppVCSConnectionCommit] - if isinstance(_vcs_connection_commit, Unset): - vcs_connection_commit = UNSET - else: - vcs_connection_commit = AppVCSConnectionCommit.from_dict(_vcs_connection_commit) - - app_component_build = cls( - checksum=checksum, - component_config_connection=component_config_connection, - component_config_connection_id=component_config_connection_id, - component_config_version=component_config_version, - component_id=component_id, - component_name=component_name, - created_at=created_at, - created_by=created_by, - created_by_id=created_by_id, - git_ref=git_ref, - id=id, - install_deploys=install_deploys, - log_stream=log_stream, - releases=releases, - runner_job=runner_job, - status=status, - status_description=status_description, - status_v2=status_v2, - updated_at=updated_at, - vcs_connection_commit=vcs_connection_commit, - ) - - app_component_build.additional_properties = d - return app_component_build - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component_build_status.py b/nuon/models/app_component_build_status.py deleted file mode 100644 index 59bef120..00000000 --- a/nuon/models/app_component_build_status.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppComponentBuildStatus(str, Enum): - ACTIVE = "active" - BUILDING = "building" - DELETING = "deleting" - ERROR = "error" - PLANNING = "planning" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_component_config_connection.py b/nuon/models/app_component_config_connection.py deleted file mode 100644 index ef7139c5..00000000 --- a/nuon/models/app_component_config_connection.py +++ /dev/null @@ -1,312 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_component_type import AppComponentType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_docker_build_component_config import AppDockerBuildComponentConfig - from ..models.app_external_image_component_config import AppExternalImageComponentConfig - from ..models.app_helm_component_config import AppHelmComponentConfig - from ..models.app_job_component_config import AppJobComponentConfig - from ..models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig - from ..models.app_terraform_module_component_config import AppTerraformModuleComponentConfig - from ..models.refs_ref import RefsRef - - -T = TypeVar("T", bound="AppComponentConfigConnection") - - -@_attrs_define -class AppComponentConfigConnection: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_config_version (Union[Unset, int]): - checksum (Union[Unset, str]): - component_dependency_ids (Union[Unset, list[str]]): - component_id (Union[Unset, str]): - component_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - docker_build (Union[Unset, AppDockerBuildComponentConfig]): - external_image (Union[Unset, AppExternalImageComponentConfig]): - helm (Union[Unset, AppHelmComponentConfig]): - id (Union[Unset, str]): - job (Union[Unset, AppJobComponentConfig]): - kubernetes_manifest (Union[Unset, AppKubernetesManifestComponentConfig]): - references (Union[Unset, list[str]]): - refs (Union[Unset, list['RefsRef']]): - terraform_module (Union[Unset, AppTerraformModuleComponentConfig]): - type_ (Union[Unset, AppComponentType]): - updated_at (Union[Unset, str]): - version (Union[Unset, int]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_config_version: Union[Unset, int] = UNSET - checksum: Union[Unset, str] = UNSET - component_dependency_ids: Union[Unset, list[str]] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - docker_build: Union[Unset, "AppDockerBuildComponentConfig"] = UNSET - external_image: Union[Unset, "AppExternalImageComponentConfig"] = UNSET - helm: Union[Unset, "AppHelmComponentConfig"] = UNSET - id: Union[Unset, str] = UNSET - job: Union[Unset, "AppJobComponentConfig"] = UNSET - kubernetes_manifest: Union[Unset, "AppKubernetesManifestComponentConfig"] = UNSET - references: Union[Unset, list[str]] = UNSET - refs: Union[Unset, list["RefsRef"]] = UNSET - terraform_module: Union[Unset, "AppTerraformModuleComponentConfig"] = UNSET - type_: Union[Unset, AppComponentType] = UNSET - updated_at: Union[Unset, str] = UNSET - version: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_config_version = self.app_config_version - - checksum = self.checksum - - component_dependency_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.component_dependency_ids, Unset): - component_dependency_ids = self.component_dependency_ids - - component_id = self.component_id - - component_name = self.component_name - - created_at = self.created_at - - created_by_id = self.created_by_id - - docker_build: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.docker_build, Unset): - docker_build = self.docker_build.to_dict() - - external_image: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.external_image, Unset): - external_image = self.external_image.to_dict() - - helm: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.helm, Unset): - helm = self.helm.to_dict() - - id = self.id - - job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.job, Unset): - job = self.job.to_dict() - - kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.kubernetes_manifest, Unset): - kubernetes_manifest = self.kubernetes_manifest.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - refs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.refs, Unset): - refs = [] - for refs_item_data in self.refs: - refs_item = refs_item_data.to_dict() - refs.append(refs_item) - - terraform_module: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.terraform_module, Unset): - terraform_module = self.terraform_module.to_dict() - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_config_version is not UNSET: - field_dict["app_config_version"] = app_config_version - if checksum is not UNSET: - field_dict["checksum"] = checksum - if component_dependency_ids is not UNSET: - field_dict["component_dependency_ids"] = component_dependency_ids - if component_id is not UNSET: - field_dict["component_id"] = component_id - if component_name is not UNSET: - field_dict["component_name"] = component_name - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if docker_build is not UNSET: - field_dict["docker_build"] = docker_build - if external_image is not UNSET: - field_dict["external_image"] = external_image - if helm is not UNSET: - field_dict["helm"] = helm - if id is not UNSET: - field_dict["id"] = id - if job is not UNSET: - field_dict["job"] = job - if kubernetes_manifest is not UNSET: - field_dict["kubernetes_manifest"] = kubernetes_manifest - if references is not UNSET: - field_dict["references"] = references - if refs is not UNSET: - field_dict["refs"] = refs - if terraform_module is not UNSET: - field_dict["terraform_module"] = terraform_module - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_docker_build_component_config import AppDockerBuildComponentConfig - from ..models.app_external_image_component_config import AppExternalImageComponentConfig - from ..models.app_helm_component_config import AppHelmComponentConfig - from ..models.app_job_component_config import AppJobComponentConfig - from ..models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig - from ..models.app_terraform_module_component_config import AppTerraformModuleComponentConfig - from ..models.refs_ref import RefsRef - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_config_version = d.pop("app_config_version", UNSET) - - checksum = d.pop("checksum", UNSET) - - component_dependency_ids = cast(list[str], d.pop("component_dependency_ids", UNSET)) - - component_id = d.pop("component_id", UNSET) - - component_name = d.pop("component_name", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _docker_build = d.pop("docker_build", UNSET) - docker_build: Union[Unset, AppDockerBuildComponentConfig] - if isinstance(_docker_build, Unset): - docker_build = UNSET - else: - docker_build = AppDockerBuildComponentConfig.from_dict(_docker_build) - - _external_image = d.pop("external_image", UNSET) - external_image: Union[Unset, AppExternalImageComponentConfig] - if isinstance(_external_image, Unset): - external_image = UNSET - else: - external_image = AppExternalImageComponentConfig.from_dict(_external_image) - - _helm = d.pop("helm", UNSET) - helm: Union[Unset, AppHelmComponentConfig] - if isinstance(_helm, Unset): - helm = UNSET - else: - helm = AppHelmComponentConfig.from_dict(_helm) - - id = d.pop("id", UNSET) - - _job = d.pop("job", UNSET) - job: Union[Unset, AppJobComponentConfig] - if isinstance(_job, Unset): - job = UNSET - else: - job = AppJobComponentConfig.from_dict(_job) - - _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) - kubernetes_manifest: Union[Unset, AppKubernetesManifestComponentConfig] - if isinstance(_kubernetes_manifest, Unset): - kubernetes_manifest = UNSET - else: - kubernetes_manifest = AppKubernetesManifestComponentConfig.from_dict(_kubernetes_manifest) - - references = cast(list[str], d.pop("references", UNSET)) - - refs = [] - _refs = d.pop("refs", UNSET) - for refs_item_data in _refs or []: - refs_item = RefsRef.from_dict(refs_item_data) - - refs.append(refs_item) - - _terraform_module = d.pop("terraform_module", UNSET) - terraform_module: Union[Unset, AppTerraformModuleComponentConfig] - if isinstance(_terraform_module, Unset): - terraform_module = UNSET - else: - terraform_module = AppTerraformModuleComponentConfig.from_dict(_terraform_module) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppComponentType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppComponentType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - version = d.pop("version", UNSET) - - app_component_config_connection = cls( - app_config_id=app_config_id, - app_config_version=app_config_version, - checksum=checksum, - component_dependency_ids=component_dependency_ids, - component_id=component_id, - component_name=component_name, - created_at=created_at, - created_by_id=created_by_id, - docker_build=docker_build, - external_image=external_image, - helm=helm, - id=id, - job=job, - kubernetes_manifest=kubernetes_manifest, - references=references, - refs=refs, - terraform_module=terraform_module, - type_=type_, - updated_at=updated_at, - version=version, - ) - - app_component_config_connection.additional_properties = d - return app_component_config_connection - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component_links.py b/nuon/models/app_component_links.py deleted file mode 100644 index cc8a64db..00000000 --- a/nuon/models/app_component_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppComponentLinks") - - -@_attrs_define -class AppComponentLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_component_links = cls() - - app_component_links.additional_properties = d - return app_component_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component_release.py b/nuon/models/app_component_release.py deleted file mode 100644 index 586260b5..00000000 --- a/nuon/models/app_component_release.py +++ /dev/null @@ -1,147 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_component_release_step import AppComponentReleaseStep - - -T = TypeVar("T", bound="AppComponentRelease") - - -@_attrs_define -class AppComponentRelease: - """ - Attributes: - build_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - release_steps (Union[Unset, list['AppComponentReleaseStep']]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - total_release_steps (Union[Unset, int]): - updated_at (Union[Unset, str]): - """ - - build_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - release_steps: Union[Unset, list["AppComponentReleaseStep"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - total_release_steps: Union[Unset, int] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - build_id = self.build_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - release_steps: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.release_steps, Unset): - release_steps = [] - for release_steps_item_data in self.release_steps: - release_steps_item = release_steps_item_data.to_dict() - release_steps.append(release_steps_item) - - status = self.status - - status_description = self.status_description - - total_release_steps = self.total_release_steps - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if build_id is not UNSET: - field_dict["build_id"] = build_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if release_steps is not UNSET: - field_dict["release_steps"] = release_steps - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if total_release_steps is not UNSET: - field_dict["total_release_steps"] = total_release_steps - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_component_release_step import AppComponentReleaseStep - - d = dict(src_dict) - build_id = d.pop("build_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - release_steps = [] - _release_steps = d.pop("release_steps", UNSET) - for release_steps_item_data in _release_steps or []: - release_steps_item = AppComponentReleaseStep.from_dict(release_steps_item_data) - - release_steps.append(release_steps_item) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - total_release_steps = d.pop("total_release_steps", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_component_release = cls( - build_id=build_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - release_steps=release_steps, - status=status, - status_description=status_description, - total_release_steps=total_release_steps, - updated_at=updated_at, - ) - - app_component_release.additional_properties = d - return app_component_release - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component_release_step.py b/nuon/models/app_component_release_step.py deleted file mode 100644 index 85a466e2..00000000 --- a/nuon/models/app_component_release_step.py +++ /dev/null @@ -1,161 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_install_deploy import AppInstallDeploy - - -T = TypeVar("T", bound="AppComponentReleaseStep") - - -@_attrs_define -class AppComponentReleaseStep: - """ - Attributes: - component_release_id (Union[Unset, str]): parent release ID - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - delay (Union[Unset, str]): fields to control the delay of the individual step, as this is set based on the - parent strategy - id (Union[Unset, str]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - requested_install_ids (Union[Unset, list[str]]): When a step is created, a set of installs are targeted. - However, by the time the release step goes out, the - install might have been setup in any order of ways. - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - component_release_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - delay: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - requested_install_ids: Union[Unset, list[str]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - component_release_id = self.component_release_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - delay = self.delay - - id = self.id - - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_deploys, Unset): - install_deploys = [] - for install_deploys_item_data in self.install_deploys: - install_deploys_item = install_deploys_item_data.to_dict() - install_deploys.append(install_deploys_item) - - requested_install_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.requested_install_ids, Unset): - requested_install_ids = self.requested_install_ids - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if component_release_id is not UNSET: - field_dict["component_release_id"] = component_release_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if delay is not UNSET: - field_dict["delay"] = delay - if id is not UNSET: - field_dict["id"] = id - if install_deploys is not UNSET: - field_dict["install_deploys"] = install_deploys - if requested_install_ids is not UNSET: - field_dict["requested_install_ids"] = requested_install_ids - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_install_deploy import AppInstallDeploy - - d = dict(src_dict) - component_release_id = d.pop("component_release_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - delay = d.pop("delay", UNSET) - - id = d.pop("id", UNSET) - - install_deploys = [] - _install_deploys = d.pop("install_deploys", UNSET) - for install_deploys_item_data in _install_deploys or []: - install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) - - install_deploys.append(install_deploys_item) - - requested_install_ids = cast(list[str], d.pop("requested_install_ids", UNSET)) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_component_release_step = cls( - component_release_id=component_release_id, - created_at=created_at, - created_by_id=created_by_id, - delay=delay, - id=id, - install_deploys=install_deploys, - requested_install_ids=requested_install_ids, - status=status, - status_description=status_description, - updated_at=updated_at, - ) - - app_component_release_step.additional_properties = d - return app_component_release_step - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_component_type.py b/nuon/models/app_component_type.py deleted file mode 100644 index 8695141f..00000000 --- a/nuon/models/app_component_type.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class AppComponentType(str, Enum): - DOCKER_BUILD = "docker_build" - EXTERNAL_IMAGE = "external_image" - HELM_CHART = "helm_chart" - JOB = "job" - KUBERNETES_MANIFEST = "kubernetes_manifest" - TERRAFORM_MODULE = "terraform_module" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_composite_status.py b/nuon/models/app_composite_status.py deleted file mode 100644 index ad3b2ae0..00000000 --- a/nuon/models/app_composite_status.py +++ /dev/null @@ -1,135 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_status import AppStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_composite_status_metadata import AppCompositeStatusMetadata - - -T = TypeVar("T", bound="AppCompositeStatus") - - -@_attrs_define -class AppCompositeStatus: - """ - Attributes: - created_at_ts (Union[Unset, int]): - created_by_id (Union[Unset, str]): - history (Union[Unset, list['AppCompositeStatus']]): - metadata (Union[Unset, AppCompositeStatusMetadata]): - status (Union[Unset, AppStatus]): - status_human_description (Union[Unset, str]): - """ - - created_at_ts: Union[Unset, int] = UNSET - created_by_id: Union[Unset, str] = UNSET - history: Union[Unset, list["AppCompositeStatus"]] = UNSET - metadata: Union[Unset, "AppCompositeStatusMetadata"] = UNSET - status: Union[Unset, AppStatus] = UNSET - status_human_description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at_ts = self.created_at_ts - - created_by_id = self.created_by_id - - history: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.history, Unset): - history = [] - for history_item_data in self.history: - history_item = history_item_data.to_dict() - history.append(history_item) - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - status_human_description = self.status_human_description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at_ts is not UNSET: - field_dict["created_at_ts"] = created_at_ts - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if history is not UNSET: - field_dict["history"] = history - if metadata is not UNSET: - field_dict["metadata"] = metadata - if status is not UNSET: - field_dict["status"] = status - if status_human_description is not UNSET: - field_dict["status_human_description"] = status_human_description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_composite_status_metadata import AppCompositeStatusMetadata - - d = dict(src_dict) - created_at_ts = d.pop("created_at_ts", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - history = [] - _history = d.pop("history", UNSET) - for history_item_data in _history or []: - history_item = AppCompositeStatus.from_dict(history_item_data) - - history.append(history_item) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppCompositeStatusMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppCompositeStatusMetadata.from_dict(_metadata) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppStatus(_status) - - status_human_description = d.pop("status_human_description", UNSET) - - app_composite_status = cls( - created_at_ts=created_at_ts, - created_by_id=created_by_id, - history=history, - metadata=metadata, - status=status, - status_human_description=status_human_description, - ) - - app_composite_status.additional_properties = d - return app_composite_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/nuon/models/app_composite_status_metadata.py b/nuon/models/app_composite_status_metadata.py deleted file mode 100644 index 1c73c829..00000000 --- a/nuon/models/app_composite_status_metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppCompositeStatusMetadata") - - -@_attrs_define -class AppCompositeStatusMetadata: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_composite_status_metadata = cls() - - app_composite_status_metadata.additional_properties = d - return app_composite_status_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/nuon/models/app_connected_github_vcs_config.py b/nuon/models/app_connected_github_vcs_config.py deleted file mode 100644 index 97f09815..00000000 --- a/nuon/models/app_connected_github_vcs_config.py +++ /dev/null @@ -1,180 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_vcs_connection import AppVCSConnection - - -T = TypeVar("T", bound="AppConnectedGithubVCSConfig") - - -@_attrs_define -class AppConnectedGithubVCSConfig: - """ - Attributes: - branch (Union[Unset, str]): - component_config_id (Union[Unset, str]): parent component - component_config_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - directory (Union[Unset, str]): - id (Union[Unset, str]): - repo (Union[Unset, str]): - repo_name (Union[Unset, str]): - repo_owner (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection (Union[Unset, AppVCSConnection]): - vcs_connection_id (Union[Unset, str]): - """ - - branch: Union[Unset, str] = UNSET - component_config_id: Union[Unset, str] = UNSET - component_config_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - directory: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - repo: Union[Unset, str] = UNSET - repo_name: Union[Unset, str] = UNSET - repo_owner: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection: Union[Unset, "AppVCSConnection"] = UNSET - vcs_connection_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - component_config_id = self.component_config_id - - component_config_type = self.component_config_type - - created_at = self.created_at - - created_by_id = self.created_by_id - - directory = self.directory - - id = self.id - - repo = self.repo - - repo_name = self.repo_name - - repo_owner = self.repo_owner - - updated_at = self.updated_at - - vcs_connection: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.vcs_connection, Unset): - vcs_connection = self.vcs_connection.to_dict() - - vcs_connection_id = self.vcs_connection_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if branch is not UNSET: - field_dict["branch"] = branch - if component_config_id is not UNSET: - field_dict["component_config_id"] = component_config_id - if component_config_type is not UNSET: - field_dict["component_config_type"] = component_config_type - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if directory is not UNSET: - field_dict["directory"] = directory - if id is not UNSET: - field_dict["id"] = id - if repo is not UNSET: - field_dict["repo"] = repo - if repo_name is not UNSET: - field_dict["repo_name"] = repo_name - if repo_owner is not UNSET: - field_dict["repo_owner"] = repo_owner - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vcs_connection is not UNSET: - field_dict["vcs_connection"] = vcs_connection - if vcs_connection_id is not UNSET: - field_dict["vcs_connection_id"] = vcs_connection_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_vcs_connection import AppVCSConnection - - d = dict(src_dict) - branch = d.pop("branch", UNSET) - - component_config_id = d.pop("component_config_id", UNSET) - - component_config_type = d.pop("component_config_type", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - directory = d.pop("directory", UNSET) - - id = d.pop("id", UNSET) - - repo = d.pop("repo", UNSET) - - repo_name = d.pop("repo_name", UNSET) - - repo_owner = d.pop("repo_owner", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - _vcs_connection = d.pop("vcs_connection", UNSET) - vcs_connection: Union[Unset, AppVCSConnection] - if isinstance(_vcs_connection, Unset): - vcs_connection = UNSET - else: - vcs_connection = AppVCSConnection.from_dict(_vcs_connection) - - vcs_connection_id = d.pop("vcs_connection_id", UNSET) - - app_connected_github_vcs_config = cls( - branch=branch, - component_config_id=component_config_id, - component_config_type=component_config_type, - created_at=created_at, - created_by_id=created_by_id, - directory=directory, - id=id, - repo=repo, - repo_name=repo_name, - repo_owner=repo_owner, - updated_at=updated_at, - vcs_connection=vcs_connection, - vcs_connection_id=vcs_connection_id, - ) - - app_connected_github_vcs_config.additional_properties = d - return app_connected_github_vcs_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_docker_build_component_config.py b/nuon/models/app_docker_build_component_config.py deleted file mode 100644 index 21ad522b..00000000 --- a/nuon/models/app_docker_build_component_config.py +++ /dev/null @@ -1,182 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - -T = TypeVar("T", bound="AppDockerBuildComponentConfig") - - -@_attrs_define -class AppDockerBuildComponentConfig: - """ - Attributes: - build_args (Union[Unset, list[str]]): - component_config_connection_id (Union[Unset, str]): value - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - dockerfile (Union[Unset, str]): - env_vars (Union[Unset, AppDockerBuildComponentConfigEnvVars]): - id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - target (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - build_args: Union[Unset, list[str]] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - dockerfile: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppDockerBuildComponentConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - target: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - build_args: Union[Unset, list[str]] = UNSET - if not isinstance(self.build_args, Unset): - build_args = self.build_args - - component_config_connection_id = self.component_config_connection_id - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - dockerfile = self.dockerfile - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - id = self.id - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - target = self.target - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if build_args is not UNSET: - field_dict["build_args"] = build_args - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if dockerfile is not UNSET: - field_dict["dockerfile"] = dockerfile - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if id is not UNSET: - field_dict["id"] = id - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if target is not UNSET: - field_dict["target"] = target - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - d = dict(src_dict) - build_args = cast(list[str], d.pop("build_args", UNSET)) - - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - dockerfile = d.pop("dockerfile", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppDockerBuildComponentConfigEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = AppDockerBuildComponentConfigEnvVars.from_dict(_env_vars) - - id = d.pop("id", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) - - target = d.pop("target", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_docker_build_component_config = cls( - build_args=build_args, - component_config_connection_id=component_config_connection_id, - connected_github_vcs_config=connected_github_vcs_config, - created_at=created_at, - created_by_id=created_by_id, - dockerfile=dockerfile, - env_vars=env_vars, - id=id, - public_git_vcs_config=public_git_vcs_config, - target=target, - updated_at=updated_at, - ) - - app_docker_build_component_config.additional_properties = d - return app_docker_build_component_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_docker_build_component_config_env_vars.py b/nuon/models/app_docker_build_component_config_env_vars.py deleted file mode 100644 index f38c7ac6..00000000 --- a/nuon/models/app_docker_build_component_config_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppDockerBuildComponentConfigEnvVars") - - -@_attrs_define -class AppDockerBuildComponentConfigEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_docker_build_component_config_env_vars = cls() - - app_docker_build_component_config_env_vars.additional_properties = d - return app_docker_build_component_config_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_external_image_component_config.py b/nuon/models/app_external_image_component_config.py deleted file mode 100644 index fd74a815..00000000 --- a/nuon/models/app_external_image_component_config.py +++ /dev/null @@ -1,135 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_awsecr_image_config import AppAWSECRImageConfig - - -T = TypeVar("T", bound="AppExternalImageComponentConfig") - - -@_attrs_define -class AppExternalImageComponentConfig: - """ - Attributes: - aws_ecr_image_config (Union[Unset, AppAWSECRImageConfig]): - component_config_connection_id (Union[Unset, str]): value - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - image_url (Union[Unset, str]): - tag (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - aws_ecr_image_config: Union[Unset, "AppAWSECRImageConfig"] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - image_url: Union[Unset, str] = UNSET - tag: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_ecr_image_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws_ecr_image_config, Unset): - aws_ecr_image_config = self.aws_ecr_image_config.to_dict() - - component_config_connection_id = self.component_config_connection_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - image_url = self.image_url - - tag = self.tag - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws_ecr_image_config is not UNSET: - field_dict["aws_ecr_image_config"] = aws_ecr_image_config - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if image_url is not UNSET: - field_dict["image_url"] = image_url - if tag is not UNSET: - field_dict["tag"] = tag - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_awsecr_image_config import AppAWSECRImageConfig - - d = dict(src_dict) - _aws_ecr_image_config = d.pop("aws_ecr_image_config", UNSET) - aws_ecr_image_config: Union[Unset, AppAWSECRImageConfig] - if isinstance(_aws_ecr_image_config, Unset): - aws_ecr_image_config = UNSET - else: - aws_ecr_image_config = AppAWSECRImageConfig.from_dict(_aws_ecr_image_config) - - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - image_url = d.pop("image_url", UNSET) - - tag = d.pop("tag", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_external_image_component_config = cls( - aws_ecr_image_config=aws_ecr_image_config, - component_config_connection_id=component_config_connection_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - image_url=image_url, - tag=tag, - updated_at=updated_at, - ) - - app_external_image_component_config.additional_properties = d - return app_external_image_component_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_helm_chart.py b/nuon/models/app_helm_chart.py deleted file mode 100644 index ac081a0a..00000000 --- a/nuon/models/app_helm_chart.py +++ /dev/null @@ -1,138 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_helm_release import AppHelmRelease - - -T = TypeVar("T", bound="AppHelmChart") - - -@_attrs_define -class AppHelmChart: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_releases (Union[Unset, list['AppHelmRelease']]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_releases: Union[Unset, list["AppHelmRelease"]] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - helm_releases: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.helm_releases, Unset): - helm_releases = [] - for helm_releases_item_data in self.helm_releases: - helm_releases_item = helm_releases_item_data.to_dict() - helm_releases.append(helm_releases_item) - - id = self.id - - org_id = self.org_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if helm_releases is not UNSET: - field_dict["helmReleases"] = helm_releases - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_helm_release import AppHelmRelease - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - helm_releases = [] - _helm_releases = d.pop("helmReleases", UNSET) - for helm_releases_item_data in _helm_releases or []: - helm_releases_item = AppHelmRelease.from_dict(helm_releases_item_data) - - helm_releases.append(helm_releases_item) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_helm_chart = cls( - created_at=created_at, - created_by_id=created_by_id, - helm_releases=helm_releases, - id=id, - org_id=org_id, - owner_id=owner_id, - owner_type=owner_type, - updated_at=updated_at, - ) - - app_helm_chart.additional_properties = d - return app_helm_chart - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_helm_component_config.py b/nuon/models/app_helm_component_config.py deleted file mode 100644 index e348bea4..00000000 --- a/nuon/models/app_helm_component_config.py +++ /dev/null @@ -1,218 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_helm_component_config_values import AppHelmComponentConfigValues - from ..models.app_helm_config import AppHelmConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - -T = TypeVar("T", bound="AppHelmComponentConfig") - - -@_attrs_define -class AppHelmComponentConfig: - """ - Attributes: - chart_name (Union[Unset, str]): Helm specific configurations - component_config_connection_id (Union[Unset, str]): parent reference - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_config_json (Union[Unset, AppHelmConfig]): - id (Union[Unset, str]): - namespace (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - storage_driver (Union[Unset, str]): - take_ownership (Union[Unset, bool]): Newer config fields that we don't need a column for - updated_at (Union[Unset, str]): - values (Union[Unset, AppHelmComponentConfigValues]): - values_files (Union[Unset, list[str]]): - """ - - chart_name: Union[Unset, str] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_config_json: Union[Unset, "AppHelmConfig"] = UNSET - id: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - storage_driver: Union[Unset, str] = UNSET - take_ownership: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET - values: Union[Unset, "AppHelmComponentConfigValues"] = UNSET - values_files: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - chart_name = self.chart_name - - component_config_connection_id = self.component_config_connection_id - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - helm_config_json: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.helm_config_json, Unset): - helm_config_json = self.helm_config_json.to_dict() - - id = self.id - - namespace = self.namespace - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - storage_driver = self.storage_driver - - take_ownership = self.take_ownership - - updated_at = self.updated_at - - values: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.values, Unset): - values = self.values.to_dict() - - values_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.values_files, Unset): - values_files = self.values_files - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if chart_name is not UNSET: - field_dict["chart_name"] = chart_name - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if helm_config_json is not UNSET: - field_dict["helm_config_json"] = helm_config_json - if id is not UNSET: - field_dict["id"] = id - if namespace is not UNSET: - field_dict["namespace"] = namespace - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if storage_driver is not UNSET: - field_dict["storage_driver"] = storage_driver - if take_ownership is not UNSET: - field_dict["take_ownership"] = take_ownership - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if values is not UNSET: - field_dict["values"] = values - if values_files is not UNSET: - field_dict["values_files"] = values_files - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_helm_component_config_values import AppHelmComponentConfigValues - from ..models.app_helm_config import AppHelmConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - - d = dict(src_dict) - chart_name = d.pop("chart_name", UNSET) - - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _helm_config_json = d.pop("helm_config_json", UNSET) - helm_config_json: Union[Unset, AppHelmConfig] - if isinstance(_helm_config_json, Unset): - helm_config_json = UNSET - else: - helm_config_json = AppHelmConfig.from_dict(_helm_config_json) - - id = d.pop("id", UNSET) - - namespace = d.pop("namespace", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) - - storage_driver = d.pop("storage_driver", UNSET) - - take_ownership = d.pop("take_ownership", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - _values = d.pop("values", UNSET) - values: Union[Unset, AppHelmComponentConfigValues] - if isinstance(_values, Unset): - values = UNSET - else: - values = AppHelmComponentConfigValues.from_dict(_values) - - values_files = cast(list[str], d.pop("values_files", UNSET)) - - app_helm_component_config = cls( - chart_name=chart_name, - component_config_connection_id=component_config_connection_id, - connected_github_vcs_config=connected_github_vcs_config, - created_at=created_at, - created_by_id=created_by_id, - helm_config_json=helm_config_json, - id=id, - namespace=namespace, - public_git_vcs_config=public_git_vcs_config, - storage_driver=storage_driver, - take_ownership=take_ownership, - updated_at=updated_at, - values=values, - values_files=values_files, - ) - - app_helm_component_config.additional_properties = d - return app_helm_component_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_helm_component_config_values.py b/nuon/models/app_helm_component_config_values.py deleted file mode 100644 index 03bfdc78..00000000 --- a/nuon/models/app_helm_component_config_values.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppHelmComponentConfigValues") - - -@_attrs_define -class AppHelmComponentConfigValues: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_helm_component_config_values = cls() - - app_helm_component_config_values.additional_properties = d - return app_helm_component_config_values - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_helm_config.py b/nuon/models/app_helm_config.py deleted file mode 100644 index 3c804fc6..00000000 --- a/nuon/models/app_helm_config.py +++ /dev/null @@ -1,119 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_helm_config_values import AppHelmConfigValues - - -T = TypeVar("T", bound="AppHelmConfig") - - -@_attrs_define -class AppHelmConfig: - """ - Attributes: - chart_name (Union[Unset, str]): - namespace (Union[Unset, str]): - storage_driver (Union[Unset, str]): - take_ownership (Union[Unset, bool]): Newer fields that we don't need to store as columns in the database - values (Union[Unset, AppHelmConfigValues]): - values_files (Union[Unset, list[str]]): - """ - - chart_name: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - storage_driver: Union[Unset, str] = UNSET - take_ownership: Union[Unset, bool] = UNSET - values: Union[Unset, "AppHelmConfigValues"] = UNSET - values_files: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - chart_name = self.chart_name - - namespace = self.namespace - - storage_driver = self.storage_driver - - take_ownership = self.take_ownership - - values: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.values, Unset): - values = self.values.to_dict() - - values_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.values_files, Unset): - values_files = self.values_files - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if chart_name is not UNSET: - field_dict["chart_name"] = chart_name - if namespace is not UNSET: - field_dict["namespace"] = namespace - if storage_driver is not UNSET: - field_dict["storage_driver"] = storage_driver - if take_ownership is not UNSET: - field_dict["take_ownership"] = take_ownership - if values is not UNSET: - field_dict["values"] = values - if values_files is not UNSET: - field_dict["values_files"] = values_files - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_helm_config_values import AppHelmConfigValues - - d = dict(src_dict) - chart_name = d.pop("chart_name", UNSET) - - namespace = d.pop("namespace", UNSET) - - storage_driver = d.pop("storage_driver", UNSET) - - take_ownership = d.pop("take_ownership", UNSET) - - _values = d.pop("values", UNSET) - values: Union[Unset, AppHelmConfigValues] - if isinstance(_values, Unset): - values = UNSET - else: - values = AppHelmConfigValues.from_dict(_values) - - values_files = cast(list[str], d.pop("values_files", UNSET)) - - app_helm_config = cls( - chart_name=chart_name, - namespace=namespace, - storage_driver=storage_driver, - take_ownership=take_ownership, - values=values, - values_files=values_files, - ) - - app_helm_config.additional_properties = d - return app_helm_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_helm_config_values.py b/nuon/models/app_helm_config_values.py deleted file mode 100644 index 6852c63b..00000000 --- a/nuon/models/app_helm_config_values.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppHelmConfigValues") - - -@_attrs_define -class AppHelmConfigValues: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_helm_config_values = cls() - - app_helm_config_values.additional_properties = d - return app_helm_config_values - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_helm_release.py b/nuon/models/app_helm_release.py deleted file mode 100644 index 08d72543..00000000 --- a/nuon/models/app_helm_release.py +++ /dev/null @@ -1,211 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_helm_chart import AppHelmChart - from ..models.app_json_map import AppJSONMap - - -T = TypeVar("T", bound="AppHelmRelease") - - -@_attrs_define -class AppHelmRelease: - """ - Attributes: - body (Union[Unset, str]): The rspb.Release body, as a base64-encoded string - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_chart (Union[Unset, AppHelmChart]): - helm_chart_id (Union[Unset, str]): - key (Union[Unset, str]): - labels (Union[Unset, AppJSONMap]): - name (Union[Unset, str]): Release "labels" that can be used as filters in the storage.Query(labels - map[string]string) - we implemented. Note that allowing Helm users to filter against new dimensions will require a - new migration to be added, and the Create and/or update functions to be updated accordingly. - namespace (Union[Unset, str]): - org_id (Union[Unset, str]): - owner (Union[Unset, str]): - status (Union[Unset, str]): - type_ (Union[Unset, str]): See - https://github.com/helm/helm/blob/c9fe3d118caec699eb2565df9838673af379ce12/pkg/storage/driver/secrets.go#L231 - updated_at (Union[Unset, str]): - version (Union[Unset, int]): - """ - - body: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_chart: Union[Unset, "AppHelmChart"] = UNSET - helm_chart_id: Union[Unset, str] = UNSET - key: Union[Unset, str] = UNSET - labels: Union[Unset, "AppJSONMap"] = UNSET - name: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - version: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - body = self.body - - created_at = self.created_at - - created_by_id = self.created_by_id - - helm_chart: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.helm_chart, Unset): - helm_chart = self.helm_chart.to_dict() - - helm_chart_id = self.helm_chart_id - - key = self.key - - labels: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.labels, Unset): - labels = self.labels.to_dict() - - name = self.name - - namespace = self.namespace - - org_id = self.org_id - - owner = self.owner - - status = self.status - - type_ = self.type_ - - updated_at = self.updated_at - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if body is not UNSET: - field_dict["body"] = body - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if helm_chart is not UNSET: - field_dict["helmChart"] = helm_chart - if helm_chart_id is not UNSET: - field_dict["helmChartID"] = helm_chart_id - if key is not UNSET: - field_dict["key"] = key - if labels is not UNSET: - field_dict["labels"] = labels - if name is not UNSET: - field_dict["name"] = name - if namespace is not UNSET: - field_dict["namespace"] = namespace - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner is not UNSET: - field_dict["owner"] = owner - if status is not UNSET: - field_dict["status"] = status - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_helm_chart import AppHelmChart - from ..models.app_json_map import AppJSONMap - - d = dict(src_dict) - body = d.pop("body", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _helm_chart = d.pop("helmChart", UNSET) - helm_chart: Union[Unset, AppHelmChart] - if isinstance(_helm_chart, Unset): - helm_chart = UNSET - else: - helm_chart = AppHelmChart.from_dict(_helm_chart) - - helm_chart_id = d.pop("helmChartID", UNSET) - - key = d.pop("key", UNSET) - - _labels = d.pop("labels", UNSET) - labels: Union[Unset, AppJSONMap] - if isinstance(_labels, Unset): - labels = UNSET - else: - labels = AppJSONMap.from_dict(_labels) - - name = d.pop("name", UNSET) - - namespace = d.pop("namespace", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner = d.pop("owner", UNSET) - - status = d.pop("status", UNSET) - - type_ = d.pop("type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - version = d.pop("version", UNSET) - - app_helm_release = cls( - body=body, - created_at=created_at, - created_by_id=created_by_id, - helm_chart=helm_chart, - helm_chart_id=helm_chart_id, - key=key, - labels=labels, - name=name, - namespace=namespace, - org_id=org_id, - owner=owner, - status=status, - type_=type_, - updated_at=updated_at, - version=version, - ) - - app_helm_release.additional_properties = d - return app_helm_release - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install.py b/nuon/models/app_install.py deleted file mode 100644 index 44f8b889..00000000 --- a/nuon/models/app_install.py +++ /dev/null @@ -1,534 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app_runner_config import AppAppRunnerConfig - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_aws_account import AppAWSAccount - from ..models.app_azure_account import AppAzureAccount - from ..models.app_install_action_workflow import AppInstallActionWorkflow - from ..models.app_install_component import AppInstallComponent - from ..models.app_install_component_statuses import AppInstallComponentStatuses - from ..models.app_install_config import AppInstallConfig - from ..models.app_install_event import AppInstallEvent - from ..models.app_install_inputs import AppInstallInputs - from ..models.app_install_links import AppInstallLinks - from ..models.app_install_sandbox import AppInstallSandbox - from ..models.app_install_sandbox_run import AppInstallSandboxRun - from ..models.app_install_stack import AppInstallStack - from ..models.app_install_state import AppInstallState - from ..models.app_workflow import AppWorkflow - - -T = TypeVar("T", bound="AppInstall") - - -@_attrs_define -class AppInstall: - """ - Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - app_runner_config (Union[Unset, AppAppRunnerConfig]): - app_sandbox_config (Union[Unset, AppAppSandboxConfig]): - aws_account (Union[Unset, AppAWSAccount]): - azure_account (Union[Unset, AppAzureAccount]): - cloud_platform (Union[Unset, str]): - component_statuses (Union[Unset, AppInstallComponentStatuses]): - composite_component_status (Union[Unset, str]): - composite_component_status_description (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_action_workflows (Union[Unset, list['AppInstallActionWorkflow']]): - install_components (Union[Unset, list['AppInstallComponent']]): - install_config (Union[Unset, AppInstallConfig]): - install_events (Union[Unset, list['AppInstallEvent']]): - install_inputs (Union[Unset, list['AppInstallInputs']]): - install_number (Union[Unset, int]): - install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): - install_stack (Union[Unset, AppInstallStack]): - install_states (Union[Unset, list['AppInstallState']]): - links (Union[Unset, AppInstallLinks]): - name (Union[Unset, str]): - runner_id (Union[Unset, str]): - runner_status (Union[Unset, str]): - runner_status_description (Union[Unset, str]): - runner_type (Union[Unset, str]): - sandbox (Union[Unset, AppInstallSandbox]): - sandbox_status (Union[Unset, str]): - sandbox_status_description (Union[Unset, str]): - status (Union[Unset, str]): TODO(jm): deprecate these fields once the terraform provider has been updated - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflows (Union[Unset, list['AppWorkflow']]): - """ - - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - app_runner_config: Union[Unset, "AppAppRunnerConfig"] = UNSET - app_sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET - aws_account: Union[Unset, "AppAWSAccount"] = UNSET - azure_account: Union[Unset, "AppAzureAccount"] = UNSET - cloud_platform: Union[Unset, str] = UNSET - component_statuses: Union[Unset, "AppInstallComponentStatuses"] = UNSET - composite_component_status: Union[Unset, str] = UNSET - composite_component_status_description: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflows: Union[Unset, list["AppInstallActionWorkflow"]] = UNSET - install_components: Union[Unset, list["AppInstallComponent"]] = UNSET - install_config: Union[Unset, "AppInstallConfig"] = UNSET - install_events: Union[Unset, list["AppInstallEvent"]] = UNSET - install_inputs: Union[Unset, list["AppInstallInputs"]] = UNSET - install_number: Union[Unset, int] = UNSET - install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET - install_stack: Union[Unset, "AppInstallStack"] = UNSET - install_states: Union[Unset, list["AppInstallState"]] = UNSET - links: Union[Unset, "AppInstallLinks"] = UNSET - name: Union[Unset, str] = UNSET - runner_id: Union[Unset, str] = UNSET - runner_status: Union[Unset, str] = UNSET - runner_status_description: Union[Unset, str] = UNSET - runner_type: Union[Unset, str] = UNSET - sandbox: Union[Unset, "AppInstallSandbox"] = UNSET - sandbox_status: Union[Unset, str] = UNSET - sandbox_status_description: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflows: Union[Unset, list["AppWorkflow"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - app_id = self.app_id - - app_runner_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.app_runner_config, Unset): - app_runner_config = self.app_runner_config.to_dict() - - app_sandbox_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.app_sandbox_config, Unset): - app_sandbox_config = self.app_sandbox_config.to_dict() - - aws_account: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws_account, Unset): - aws_account = self.aws_account.to_dict() - - azure_account: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.azure_account, Unset): - azure_account = self.azure_account.to_dict() - - cloud_platform = self.cloud_platform - - component_statuses: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.component_statuses, Unset): - component_statuses = self.component_statuses.to_dict() - - composite_component_status = self.composite_component_status - - composite_component_status_description = self.composite_component_status_description - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_action_workflows: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_action_workflows, Unset): - install_action_workflows = [] - for install_action_workflows_item_data in self.install_action_workflows: - install_action_workflows_item = install_action_workflows_item_data.to_dict() - install_action_workflows.append(install_action_workflows_item) - - install_components: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_components, Unset): - install_components = [] - for install_components_item_data in self.install_components: - install_components_item = install_components_item_data.to_dict() - install_components.append(install_components_item) - - install_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_config, Unset): - install_config = self.install_config.to_dict() - - install_events: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_events, Unset): - install_events = [] - for install_events_item_data in self.install_events: - install_events_item = install_events_item_data.to_dict() - install_events.append(install_events_item) - - install_inputs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_inputs, Unset): - install_inputs = [] - for install_inputs_item_data in self.install_inputs: - install_inputs_item = install_inputs_item_data.to_dict() - install_inputs.append(install_inputs_item) - - install_number = self.install_number - - install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_sandbox_runs, Unset): - install_sandbox_runs = [] - for install_sandbox_runs_item_data in self.install_sandbox_runs: - install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() - install_sandbox_runs.append(install_sandbox_runs_item) - - install_stack: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_stack, Unset): - install_stack = self.install_stack.to_dict() - - install_states: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_states, Unset): - install_states = [] - for install_states_item_data in self.install_states: - install_states_item = install_states_item_data.to_dict() - install_states.append(install_states_item) - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - name = self.name - - runner_id = self.runner_id - - runner_status = self.runner_status - - runner_status_description = self.runner_status_description - - runner_type = self.runner_type - - sandbox: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.sandbox, Unset): - sandbox = self.sandbox.to_dict() - - sandbox_status = self.sandbox_status - - sandbox_status_description = self.sandbox_status_description - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - workflows: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.workflows, Unset): - workflows = [] - for workflows_item_data in self.workflows: - workflows_item = workflows_item_data.to_dict() - workflows.append(workflows_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if app_id is not UNSET: - field_dict["app_id"] = app_id - if app_runner_config is not UNSET: - field_dict["app_runner_config"] = app_runner_config - if app_sandbox_config is not UNSET: - field_dict["app_sandbox_config"] = app_sandbox_config - if aws_account is not UNSET: - field_dict["aws_account"] = aws_account - if azure_account is not UNSET: - field_dict["azure_account"] = azure_account - if cloud_platform is not UNSET: - field_dict["cloud_platform"] = cloud_platform - if component_statuses is not UNSET: - field_dict["component_statuses"] = component_statuses - if composite_component_status is not UNSET: - field_dict["composite_component_status"] = composite_component_status - if composite_component_status_description is not UNSET: - field_dict["composite_component_status_description"] = composite_component_status_description - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_action_workflows is not UNSET: - field_dict["install_action_workflows"] = install_action_workflows - if install_components is not UNSET: - field_dict["install_components"] = install_components - if install_config is not UNSET: - field_dict["install_config"] = install_config - if install_events is not UNSET: - field_dict["install_events"] = install_events - if install_inputs is not UNSET: - field_dict["install_inputs"] = install_inputs - if install_number is not UNSET: - field_dict["install_number"] = install_number - if install_sandbox_runs is not UNSET: - field_dict["install_sandbox_runs"] = install_sandbox_runs - if install_stack is not UNSET: - field_dict["install_stack"] = install_stack - if install_states is not UNSET: - field_dict["install_states"] = install_states - if links is not UNSET: - field_dict["links"] = links - if name is not UNSET: - field_dict["name"] = name - if runner_id is not UNSET: - field_dict["runner_id"] = runner_id - if runner_status is not UNSET: - field_dict["runner_status"] = runner_status - if runner_status_description is not UNSET: - field_dict["runner_status_description"] = runner_status_description - if runner_type is not UNSET: - field_dict["runner_type"] = runner_type - if sandbox is not UNSET: - field_dict["sandbox"] = sandbox - if sandbox_status is not UNSET: - field_dict["sandbox_status"] = sandbox_status - if sandbox_status_description is not UNSET: - field_dict["sandbox_status_description"] = sandbox_status_description - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflows is not UNSET: - field_dict["workflows"] = workflows - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app_runner_config import AppAppRunnerConfig - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_aws_account import AppAWSAccount - from ..models.app_azure_account import AppAzureAccount - from ..models.app_install_action_workflow import AppInstallActionWorkflow - from ..models.app_install_component import AppInstallComponent - from ..models.app_install_component_statuses import AppInstallComponentStatuses - from ..models.app_install_config import AppInstallConfig - from ..models.app_install_event import AppInstallEvent - from ..models.app_install_inputs import AppInstallInputs - from ..models.app_install_links import AppInstallLinks - from ..models.app_install_sandbox import AppInstallSandbox - from ..models.app_install_sandbox_run import AppInstallSandboxRun - from ..models.app_install_stack import AppInstallStack - from ..models.app_install_state import AppInstallState - from ..models.app_workflow import AppWorkflow - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - app_id = d.pop("app_id", UNSET) - - _app_runner_config = d.pop("app_runner_config", UNSET) - app_runner_config: Union[Unset, AppAppRunnerConfig] - if isinstance(_app_runner_config, Unset): - app_runner_config = UNSET - else: - app_runner_config = AppAppRunnerConfig.from_dict(_app_runner_config) - - _app_sandbox_config = d.pop("app_sandbox_config", UNSET) - app_sandbox_config: Union[Unset, AppAppSandboxConfig] - if isinstance(_app_sandbox_config, Unset): - app_sandbox_config = UNSET - else: - app_sandbox_config = AppAppSandboxConfig.from_dict(_app_sandbox_config) - - _aws_account = d.pop("aws_account", UNSET) - aws_account: Union[Unset, AppAWSAccount] - if isinstance(_aws_account, Unset): - aws_account = UNSET - else: - aws_account = AppAWSAccount.from_dict(_aws_account) - - _azure_account = d.pop("azure_account", UNSET) - azure_account: Union[Unset, AppAzureAccount] - if isinstance(_azure_account, Unset): - azure_account = UNSET - else: - azure_account = AppAzureAccount.from_dict(_azure_account) - - cloud_platform = d.pop("cloud_platform", UNSET) - - _component_statuses = d.pop("component_statuses", UNSET) - component_statuses: Union[Unset, AppInstallComponentStatuses] - if isinstance(_component_statuses, Unset): - component_statuses = UNSET - else: - component_statuses = AppInstallComponentStatuses.from_dict(_component_statuses) - - composite_component_status = d.pop("composite_component_status", UNSET) - - composite_component_status_description = d.pop("composite_component_status_description", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_action_workflows = [] - _install_action_workflows = d.pop("install_action_workflows", UNSET) - for install_action_workflows_item_data in _install_action_workflows or []: - install_action_workflows_item = AppInstallActionWorkflow.from_dict(install_action_workflows_item_data) - - install_action_workflows.append(install_action_workflows_item) - - install_components = [] - _install_components = d.pop("install_components", UNSET) - for install_components_item_data in _install_components or []: - install_components_item = AppInstallComponent.from_dict(install_components_item_data) - - install_components.append(install_components_item) - - _install_config = d.pop("install_config", UNSET) - install_config: Union[Unset, AppInstallConfig] - if isinstance(_install_config, Unset): - install_config = UNSET - else: - install_config = AppInstallConfig.from_dict(_install_config) - - install_events = [] - _install_events = d.pop("install_events", UNSET) - for install_events_item_data in _install_events or []: - install_events_item = AppInstallEvent.from_dict(install_events_item_data) - - install_events.append(install_events_item) - - install_inputs = [] - _install_inputs = d.pop("install_inputs", UNSET) - for install_inputs_item_data in _install_inputs or []: - install_inputs_item = AppInstallInputs.from_dict(install_inputs_item_data) - - install_inputs.append(install_inputs_item) - - install_number = d.pop("install_number", UNSET) - - install_sandbox_runs = [] - _install_sandbox_runs = d.pop("install_sandbox_runs", UNSET) - for install_sandbox_runs_item_data in _install_sandbox_runs or []: - install_sandbox_runs_item = AppInstallSandboxRun.from_dict(install_sandbox_runs_item_data) - - install_sandbox_runs.append(install_sandbox_runs_item) - - _install_stack = d.pop("install_stack", UNSET) - install_stack: Union[Unset, AppInstallStack] - if isinstance(_install_stack, Unset): - install_stack = UNSET - else: - install_stack = AppInstallStack.from_dict(_install_stack) - - install_states = [] - _install_states = d.pop("install_states", UNSET) - for install_states_item_data in _install_states or []: - install_states_item = AppInstallState.from_dict(install_states_item_data) - - install_states.append(install_states_item) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppInstallLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppInstallLinks.from_dict(_links) - - name = d.pop("name", UNSET) - - runner_id = d.pop("runner_id", UNSET) - - runner_status = d.pop("runner_status", UNSET) - - runner_status_description = d.pop("runner_status_description", UNSET) - - runner_type = d.pop("runner_type", UNSET) - - _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, AppInstallSandbox] - if isinstance(_sandbox, Unset): - sandbox = UNSET - else: - sandbox = AppInstallSandbox.from_dict(_sandbox) - - sandbox_status = d.pop("sandbox_status", UNSET) - - sandbox_status_description = d.pop("sandbox_status_description", UNSET) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - workflows = [] - _workflows = d.pop("workflows", UNSET) - for workflows_item_data in _workflows or []: - workflows_item = AppWorkflow.from_dict(workflows_item_data) - - workflows.append(workflows_item) - - app_install = cls( - app_config_id=app_config_id, - app_id=app_id, - app_runner_config=app_runner_config, - app_sandbox_config=app_sandbox_config, - aws_account=aws_account, - azure_account=azure_account, - cloud_platform=cloud_platform, - component_statuses=component_statuses, - composite_component_status=composite_component_status, - composite_component_status_description=composite_component_status_description, - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_action_workflows=install_action_workflows, - install_components=install_components, - install_config=install_config, - install_events=install_events, - install_inputs=install_inputs, - install_number=install_number, - install_sandbox_runs=install_sandbox_runs, - install_stack=install_stack, - install_states=install_states, - links=links, - name=name, - runner_id=runner_id, - runner_status=runner_status, - runner_status_description=runner_status_description, - runner_type=runner_type, - sandbox=sandbox, - sandbox_status=sandbox_status, - sandbox_status_description=sandbox_status_description, - status=status, - status_description=status_description, - updated_at=updated_at, - workflows=workflows, - ) - - app_install.additional_properties = d - return app_install - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow.py b/nuon/models/app_install_action_workflow.py deleted file mode 100644 index 29244516..00000000 --- a/nuon/models/app_install_action_workflow.py +++ /dev/null @@ -1,156 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_action_workflow import AppActionWorkflow - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - - -T = TypeVar("T", bound="AppInstallActionWorkflow") - - -@_attrs_define -class AppInstallActionWorkflow: - """ - Attributes: - action_workflow (Union[Unset, AppActionWorkflow]): - action_workflow_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - status (Union[Unset, str]): after query fields filled in after querying - updated_at (Union[Unset, str]): - """ - - action_workflow: Union[Unset, "AppActionWorkflow"] = UNSET - action_workflow_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - status: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.action_workflow, Unset): - action_workflow = self.action_workflow.to_dict() - - action_workflow_id = self.action_workflow_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.runs, Unset): - runs = [] - for runs_item_data in self.runs: - runs_item = runs_item_data.to_dict() - runs.append(runs_item) - - status = self.status - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow is not UNSET: - field_dict["action_workflow"] = action_workflow - if action_workflow_id is not UNSET: - field_dict["action_workflow_id"] = action_workflow_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if runs is not UNSET: - field_dict["runs"] = runs - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_action_workflow import AppActionWorkflow - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - - d = dict(src_dict) - _action_workflow = d.pop("action_workflow", UNSET) - action_workflow: Union[Unset, AppActionWorkflow] - if isinstance(_action_workflow, Unset): - action_workflow = UNSET - else: - action_workflow = AppActionWorkflow.from_dict(_action_workflow) - - action_workflow_id = d.pop("action_workflow_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - runs = [] - _runs = d.pop("runs", UNSET) - for runs_item_data in _runs or []: - runs_item = AppInstallActionWorkflowRun.from_dict(runs_item_data) - - runs.append(runs_item) - - status = d.pop("status", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_install_action_workflow = cls( - action_workflow=action_workflow, - action_workflow_id=action_workflow_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - runs=runs, - status=status, - updated_at=updated_at, - ) - - app_install_action_workflow.additional_properties = d - return app_install_action_workflow - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run.py b/nuon/models/app_install_action_workflow_run.py deleted file mode 100644 index 34951381..00000000 --- a/nuon/models/app_install_action_workflow_run.py +++ /dev/null @@ -1,380 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_action_workflow_trigger_type import AppActionWorkflowTriggerType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_action_workflow_config import AppActionWorkflowConfig - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow import AppInstallActionWorkflow - from ..models.app_install_action_workflow_run_outputs import AppInstallActionWorkflowRunOutputs - from ..models.app_install_action_workflow_run_run_env_vars import AppInstallActionWorkflowRunRunEnvVars - from ..models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep - from ..models.app_log_stream import AppLogStream - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow import AppWorkflow - - -T = TypeVar("T", bound="AppInstallActionWorkflowRun") - - -@_attrs_define -class AppInstallActionWorkflowRun: - """ - Attributes: - action_workflow_config_id (Union[Unset, str]): - config (Union[Unset, AppActionWorkflowConfig]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - execution_time (Union[Unset, int]): after query - id (Union[Unset, str]): - install_action_workflow (Union[Unset, AppInstallActionWorkflow]): - install_action_workflow_id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_workflow_id (Union[Unset, str]): - log_stream (Union[Unset, AppLogStream]): - outputs (Union[Unset, AppInstallActionWorkflowRunOutputs]): - run_env_vars (Union[Unset, AppInstallActionWorkflowRunRunEnvVars]): - runner_job (Union[Unset, AppRunnerJob]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - steps (Union[Unset, list['AppInstallActionWorkflowRunStep']]): - trigger_type (Union[Unset, AppActionWorkflowTriggerType]): - triggered_by_id (Union[Unset, str]): - triggered_by_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflow (Union[Unset, AppWorkflow]): - workflow_id (Union[Unset, str]): - """ - - action_workflow_config_id: Union[Unset, str] = UNSET - config: Union[Unset, "AppActionWorkflowConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_time: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflow: Union[Unset, "AppInstallActionWorkflow"] = UNSET - install_action_workflow_id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - outputs: Union[Unset, "AppInstallActionWorkflowRunOutputs"] = UNSET - run_env_vars: Union[Unset, "AppInstallActionWorkflowRunRunEnvVars"] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - steps: Union[Unset, list["AppInstallActionWorkflowRunStep"]] = UNSET - trigger_type: Union[Unset, AppActionWorkflowTriggerType] = UNSET - triggered_by_id: Union[Unset, str] = UNSET - triggered_by_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow: Union[Unset, "AppWorkflow"] = UNSET - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_config_id = self.action_workflow_config_id - - config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.config, Unset): - config = self.config.to_dict() - - created_at = self.created_at - - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_by_id = self.created_by_id - - execution_time = self.execution_time - - id = self.id - - install_action_workflow: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_action_workflow, Unset): - install_action_workflow = self.install_action_workflow.to_dict() - - install_action_workflow_id = self.install_action_workflow_id - - install_id = self.install_id - - install_workflow_id = self.install_workflow_id - - log_stream: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.log_stream, Unset): - log_stream = self.log_stream.to_dict() - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - run_env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.run_env_vars, Unset): - run_env_vars = self.run_env_vars.to_dict() - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - status = self.status - - status_description = self.status_description - - status_v2: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status_v2, Unset): - status_v2 = self.status_v2.to_dict() - - steps: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.steps, Unset): - steps = [] - for steps_item_data in self.steps: - steps_item = steps_item_data.to_dict() - steps.append(steps_item) - - trigger_type: Union[Unset, str] = UNSET - if not isinstance(self.trigger_type, Unset): - trigger_type = self.trigger_type.value - - triggered_by_id = self.triggered_by_id - - triggered_by_type = self.triggered_by_type - - updated_at = self.updated_at - - workflow: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.workflow, Unset): - workflow = self.workflow.to_dict() - - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_config_id is not UNSET: - field_dict["action_workflow_config_id"] = action_workflow_config_id - if config is not UNSET: - field_dict["config"] = config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by is not UNSET: - field_dict["created_by"] = created_by - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if execution_time is not UNSET: - field_dict["execution_time"] = execution_time - if id is not UNSET: - field_dict["id"] = id - if install_action_workflow is not UNSET: - field_dict["install_action_workflow"] = install_action_workflow - if install_action_workflow_id is not UNSET: - field_dict["install_action_workflow_id"] = install_action_workflow_id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if install_workflow_id is not UNSET: - field_dict["install_workflow_id"] = install_workflow_id - if log_stream is not UNSET: - field_dict["log_stream"] = log_stream - if outputs is not UNSET: - field_dict["outputs"] = outputs - if run_env_vars is not UNSET: - field_dict["run_env_vars"] = run_env_vars - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if status_v2 is not UNSET: - field_dict["status_v2"] = status_v2 - if steps is not UNSET: - field_dict["steps"] = steps - if trigger_type is not UNSET: - field_dict["trigger_type"] = trigger_type - if triggered_by_id is not UNSET: - field_dict["triggered_by_id"] = triggered_by_id - if triggered_by_type is not UNSET: - field_dict["triggered_by_type"] = triggered_by_type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflow is not UNSET: - field_dict["workflow"] = workflow - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_action_workflow_config import AppActionWorkflowConfig - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow import AppInstallActionWorkflow - from ..models.app_install_action_workflow_run_outputs import AppInstallActionWorkflowRunOutputs - from ..models.app_install_action_workflow_run_run_env_vars import AppInstallActionWorkflowRunRunEnvVars - from ..models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep - from ..models.app_log_stream import AppLogStream - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow import AppWorkflow - - d = dict(src_dict) - action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) - - _config = d.pop("config", UNSET) - config: Union[Unset, AppActionWorkflowConfig] - if isinstance(_config, Unset): - config = UNSET - else: - config = AppActionWorkflowConfig.from_dict(_config) - - created_at = d.pop("created_at", UNSET) - - _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_by_id = d.pop("created_by_id", UNSET) - - execution_time = d.pop("execution_time", UNSET) - - id = d.pop("id", UNSET) - - _install_action_workflow = d.pop("install_action_workflow", UNSET) - install_action_workflow: Union[Unset, AppInstallActionWorkflow] - if isinstance(_install_action_workflow, Unset): - install_action_workflow = UNSET - else: - install_action_workflow = AppInstallActionWorkflow.from_dict(_install_action_workflow) - - install_action_workflow_id = d.pop("install_action_workflow_id", UNSET) - - install_id = d.pop("install_id", UNSET) - - install_workflow_id = d.pop("install_workflow_id", UNSET) - - _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] - if isinstance(_log_stream, Unset): - log_stream = UNSET - else: - log_stream = AppLogStream.from_dict(_log_stream) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppInstallActionWorkflowRunOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = AppInstallActionWorkflowRunOutputs.from_dict(_outputs) - - _run_env_vars = d.pop("run_env_vars", UNSET) - run_env_vars: Union[Unset, AppInstallActionWorkflowRunRunEnvVars] - if isinstance(_run_env_vars, Unset): - run_env_vars = UNSET - else: - run_env_vars = AppInstallActionWorkflowRunRunEnvVars.from_dict(_run_env_vars) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] - if isinstance(_status_v2, Unset): - status_v2 = UNSET - else: - status_v2 = AppCompositeStatus.from_dict(_status_v2) - - steps = [] - _steps = d.pop("steps", UNSET) - for steps_item_data in _steps or []: - steps_item = AppInstallActionWorkflowRunStep.from_dict(steps_item_data) - - steps.append(steps_item) - - _trigger_type = d.pop("trigger_type", UNSET) - trigger_type: Union[Unset, AppActionWorkflowTriggerType] - if isinstance(_trigger_type, Unset): - trigger_type = UNSET - else: - trigger_type = AppActionWorkflowTriggerType(_trigger_type) - - triggered_by_id = d.pop("triggered_by_id", UNSET) - - triggered_by_type = d.pop("triggered_by_type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - _workflow = d.pop("workflow", UNSET) - workflow: Union[Unset, AppWorkflow] - if isinstance(_workflow, Unset): - workflow = UNSET - else: - workflow = AppWorkflow.from_dict(_workflow) - - workflow_id = d.pop("workflow_id", UNSET) - - app_install_action_workflow_run = cls( - action_workflow_config_id=action_workflow_config_id, - config=config, - created_at=created_at, - created_by=created_by, - created_by_id=created_by_id, - execution_time=execution_time, - id=id, - install_action_workflow=install_action_workflow, - install_action_workflow_id=install_action_workflow_id, - install_id=install_id, - install_workflow_id=install_workflow_id, - log_stream=log_stream, - outputs=outputs, - run_env_vars=run_env_vars, - runner_job=runner_job, - status=status, - status_description=status_description, - status_v2=status_v2, - steps=steps, - trigger_type=trigger_type, - triggered_by_id=triggered_by_id, - triggered_by_type=triggered_by_type, - updated_at=updated_at, - workflow=workflow, - workflow_id=workflow_id, - ) - - app_install_action_workflow_run.additional_properties = d - return app_install_action_workflow_run - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_outputs.py b/nuon/models/app_install_action_workflow_run_outputs.py deleted file mode 100644 index f43cd7eb..00000000 --- a/nuon/models/app_install_action_workflow_run_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallActionWorkflowRunOutputs") - - -@_attrs_define -class AppInstallActionWorkflowRunOutputs: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_action_workflow_run_outputs = cls() - - app_install_action_workflow_run_outputs.additional_properties = d - return app_install_action_workflow_run_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_run_env_vars.py b/nuon/models/app_install_action_workflow_run_run_env_vars.py deleted file mode 100644 index d901645e..00000000 --- a/nuon/models/app_install_action_workflow_run_run_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallActionWorkflowRunRunEnvVars") - - -@_attrs_define -class AppInstallActionWorkflowRunRunEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_action_workflow_run_run_env_vars = cls() - - app_install_action_workflow_run_run_env_vars.additional_properties = d - return app_install_action_workflow_run_run_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_step.py b/nuon/models/app_install_action_workflow_run_step.py deleted file mode 100644 index dce05586..00000000 --- a/nuon/models/app_install_action_workflow_run_step.py +++ /dev/null @@ -1,130 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_action_workflow_run_step_status import AppInstallActionWorkflowRunStepStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppInstallActionWorkflowRunStep") - - -@_attrs_define -class AppInstallActionWorkflowRunStep: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - execution_duration (Union[Unset, int]): - id (Union[Unset, str]): - install_action_workflow_run_id (Union[Unset, str]): - status (Union[Unset, AppInstallActionWorkflowRunStepStatus]): - step_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_duration: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflow_run_id: Union[Unset, str] = UNSET - status: Union[Unset, AppInstallActionWorkflowRunStepStatus] = UNSET - step_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - execution_duration = self.execution_duration - - id = self.id - - install_action_workflow_run_id = self.install_action_workflow_run_id - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - step_id = self.step_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if execution_duration is not UNSET: - field_dict["execution_duration"] = execution_duration - if id is not UNSET: - field_dict["id"] = id - if install_action_workflow_run_id is not UNSET: - field_dict["install_action_workflow_run_id"] = install_action_workflow_run_id - if status is not UNSET: - field_dict["status"] = status - if step_id is not UNSET: - field_dict["step_id"] = step_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - execution_duration = d.pop("execution_duration", UNSET) - - id = d.pop("id", UNSET) - - install_action_workflow_run_id = d.pop("install_action_workflow_run_id", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppInstallActionWorkflowRunStepStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppInstallActionWorkflowRunStepStatus(_status) - - step_id = d.pop("step_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_install_action_workflow_run_step = cls( - created_at=created_at, - created_by_id=created_by_id, - execution_duration=execution_duration, - id=id, - install_action_workflow_run_id=install_action_workflow_run_id, - status=status, - step_id=step_id, - updated_at=updated_at, - ) - - app_install_action_workflow_run_step.additional_properties = d - return app_install_action_workflow_run_step - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_step_status.py b/nuon/models/app_install_action_workflow_run_step_status.py deleted file mode 100644 index c0fe7c36..00000000 --- a/nuon/models/app_install_action_workflow_run_step_status.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppInstallActionWorkflowRunStepStatus(str, Enum): - ERROR = "error" - FINISHED = "finished" - IN_PROGRESS = "in-progress" - PENDING = "pending" - TIMED_OUT = "timed-out" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_install_approval_option.py b/nuon/models/app_install_approval_option.py deleted file mode 100644 index 13fe1526..00000000 --- a/nuon/models/app_install_approval_option.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class AppInstallApprovalOption(str, Enum): - APPROVE_ALL = "approve-all" - PROMPT = "prompt" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_install_audit_log.py b/nuon/models/app_install_audit_log.py deleted file mode 100644 index ebeacd34..00000000 --- a/nuon/models/app_install_audit_log.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppInstallAuditLog") - - -@_attrs_define -class AppInstallAuditLog: - """ - Attributes: - install_id (Union[Unset, str]): - log_line (Union[Unset, str]): - time_stamp (Union[Unset, str]): - type_ (Union[Unset, str]): - """ - - install_id: Union[Unset, str] = UNSET - log_line: Union[Unset, str] = UNSET - time_stamp: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - install_id = self.install_id - - log_line = self.log_line - - time_stamp = self.time_stamp - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if install_id is not UNSET: - field_dict["install_id"] = install_id - if log_line is not UNSET: - field_dict["log_line"] = log_line - if time_stamp is not UNSET: - field_dict["time_stamp"] = time_stamp - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - install_id = d.pop("install_id", UNSET) - - log_line = d.pop("log_line", UNSET) - - time_stamp = d.pop("time_stamp", UNSET) - - type_ = d.pop("type", UNSET) - - app_install_audit_log = cls( - install_id=install_id, - log_line=log_line, - time_stamp=time_stamp, - type_=type_, - ) - - app_install_audit_log.additional_properties = d - return app_install_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/nuon/models/app_install_component.py b/nuon/models/app_install_component.py deleted file mode 100644 index 60bce3e0..00000000 --- a/nuon/models/app_install_component.py +++ /dev/null @@ -1,237 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_component import AppComponent - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_helm_chart import AppHelmChart - from ..models.app_install_component_links import AppInstallComponentLinks - from ..models.app_install_deploy import AppInstallDeploy - from ..models.app_terraform_workspace import AppTerraformWorkspace - - -T = TypeVar("T", bound="AppInstallComponent") - - -@_attrs_define -class AppInstallComponent: - """ - Attributes: - component (Union[Unset, AppComponent]): - component_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_chart (Union[Unset, AppHelmChart]): - id (Union[Unset, str]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - install_id (Union[Unset, str]): - links (Union[Unset, AppInstallComponentLinks]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - terraform_workspace (Union[Unset, AppTerraformWorkspace]): - updated_at (Union[Unset, str]): - """ - - component: Union[Unset, "AppComponent"] = UNSET - component_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_chart: Union[Unset, "AppHelmChart"] = UNSET - id: Union[Unset, str] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - install_id: Union[Unset, str] = UNSET - links: Union[Unset, "AppInstallComponentLinks"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - component: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.component, Unset): - component = self.component.to_dict() - - component_id = self.component_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - helm_chart: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.helm_chart, Unset): - helm_chart = self.helm_chart.to_dict() - - id = self.id - - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_deploys, Unset): - install_deploys = [] - for install_deploys_item_data in self.install_deploys: - install_deploys_item = install_deploys_item_data.to_dict() - install_deploys.append(install_deploys_item) - - install_id = self.install_id - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - status = self.status - - status_description = self.status_description - - status_v2: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status_v2, Unset): - status_v2 = self.status_v2.to_dict() - - terraform_workspace: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.terraform_workspace, Unset): - terraform_workspace = self.terraform_workspace.to_dict() - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if component is not UNSET: - field_dict["component"] = component - if component_id is not UNSET: - field_dict["component_id"] = component_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if helm_chart is not UNSET: - field_dict["helm_chart"] = helm_chart - if id is not UNSET: - field_dict["id"] = id - if install_deploys is not UNSET: - field_dict["install_deploys"] = install_deploys - if install_id is not UNSET: - field_dict["install_id"] = install_id - if links is not UNSET: - field_dict["links"] = links - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if status_v2 is not UNSET: - field_dict["status_v2"] = status_v2 - if terraform_workspace is not UNSET: - field_dict["terraform_workspace"] = terraform_workspace - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_component import AppComponent - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_helm_chart import AppHelmChart - from ..models.app_install_component_links import AppInstallComponentLinks - from ..models.app_install_deploy import AppInstallDeploy - from ..models.app_terraform_workspace import AppTerraformWorkspace - - d = dict(src_dict) - _component = d.pop("component", UNSET) - component: Union[Unset, AppComponent] - if isinstance(_component, Unset): - component = UNSET - else: - component = AppComponent.from_dict(_component) - - component_id = d.pop("component_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _helm_chart = d.pop("helm_chart", UNSET) - helm_chart: Union[Unset, AppHelmChart] - if isinstance(_helm_chart, Unset): - helm_chart = UNSET - else: - helm_chart = AppHelmChart.from_dict(_helm_chart) - - id = d.pop("id", UNSET) - - install_deploys = [] - _install_deploys = d.pop("install_deploys", UNSET) - for install_deploys_item_data in _install_deploys or []: - install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) - - install_deploys.append(install_deploys_item) - - install_id = d.pop("install_id", UNSET) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppInstallComponentLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppInstallComponentLinks.from_dict(_links) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] - if isinstance(_status_v2, Unset): - status_v2 = UNSET - else: - status_v2 = AppCompositeStatus.from_dict(_status_v2) - - _terraform_workspace = d.pop("terraform_workspace", UNSET) - terraform_workspace: Union[Unset, AppTerraformWorkspace] - if isinstance(_terraform_workspace, Unset): - terraform_workspace = UNSET - else: - terraform_workspace = AppTerraformWorkspace.from_dict(_terraform_workspace) - - updated_at = d.pop("updated_at", UNSET) - - app_install_component = cls( - component=component, - component_id=component_id, - created_at=created_at, - created_by_id=created_by_id, - helm_chart=helm_chart, - id=id, - install_deploys=install_deploys, - install_id=install_id, - links=links, - status=status, - status_description=status_description, - status_v2=status_v2, - terraform_workspace=terraform_workspace, - updated_at=updated_at, - ) - - app_install_component.additional_properties = d - return app_install_component - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_component_links.py b/nuon/models/app_install_component_links.py deleted file mode 100644 index f581acfb..00000000 --- a/nuon/models/app_install_component_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallComponentLinks") - - -@_attrs_define -class AppInstallComponentLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_component_links = cls() - - app_install_component_links.additional_properties = d - return app_install_component_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_component_statuses.py b/nuon/models/app_install_component_statuses.py deleted file mode 100644 index 15e94f1b..00000000 --- a/nuon/models/app_install_component_statuses.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallComponentStatuses") - - -@_attrs_define -class AppInstallComponentStatuses: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_component_statuses = cls() - - app_install_component_statuses.additional_properties = d - return app_install_component_statuses - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_component_summary.py b/nuon/models/app_install_component_summary.py deleted file mode 100644 index 3f55a42b..00000000 --- a/nuon/models/app_install_component_summary.py +++ /dev/null @@ -1,172 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_component_build_status import AppComponentBuildStatus -from ..models.app_install_deploy_status import AppInstallDeployStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_component import AppComponent - from ..models.app_component_config_connection import AppComponentConfigConnection - - -T = TypeVar("T", bound="AppInstallComponentSummary") - - -@_attrs_define -class AppInstallComponentSummary: - """ - Attributes: - build_status (Union[Unset, AppComponentBuildStatus]): - build_status_description (Union[Unset, str]): - component_config (Union[Unset, AppComponentConfigConnection]): - component_id (Union[Unset, str]): - component_name (Union[Unset, str]): - dependencies (Union[Unset, list['AppComponent']]): - deploy_status (Union[Unset, AppInstallDeployStatus]): - deploy_status_description (Union[Unset, str]): - id (Union[Unset, str]): - """ - - build_status: Union[Unset, AppComponentBuildStatus] = UNSET - build_status_description: Union[Unset, str] = UNSET - component_config: Union[Unset, "AppComponentConfigConnection"] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - dependencies: Union[Unset, list["AppComponent"]] = UNSET - deploy_status: Union[Unset, AppInstallDeployStatus] = UNSET - deploy_status_description: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - build_status: Union[Unset, str] = UNSET - if not isinstance(self.build_status, Unset): - build_status = self.build_status.value - - build_status_description = self.build_status_description - - component_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.component_config, Unset): - component_config = self.component_config.to_dict() - - component_id = self.component_id - - component_name = self.component_name - - dependencies: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = [] - for dependencies_item_data in self.dependencies: - dependencies_item = dependencies_item_data.to_dict() - dependencies.append(dependencies_item) - - deploy_status: Union[Unset, str] = UNSET - if not isinstance(self.deploy_status, Unset): - deploy_status = self.deploy_status.value - - deploy_status_description = self.deploy_status_description - - id = self.id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if build_status is not UNSET: - field_dict["build_status"] = build_status - if build_status_description is not UNSET: - field_dict["build_status_description"] = build_status_description - if component_config is not UNSET: - field_dict["component_config"] = component_config - if component_id is not UNSET: - field_dict["component_id"] = component_id - if component_name is not UNSET: - field_dict["component_name"] = component_name - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if deploy_status is not UNSET: - field_dict["deploy_status"] = deploy_status - if deploy_status_description is not UNSET: - field_dict["deploy_status_description"] = deploy_status_description - if id is not UNSET: - field_dict["id"] = id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_component import AppComponent - from ..models.app_component_config_connection import AppComponentConfigConnection - - d = dict(src_dict) - _build_status = d.pop("build_status", UNSET) - build_status: Union[Unset, AppComponentBuildStatus] - if isinstance(_build_status, Unset): - build_status = UNSET - else: - build_status = AppComponentBuildStatus(_build_status) - - build_status_description = d.pop("build_status_description", UNSET) - - _component_config = d.pop("component_config", UNSET) - component_config: Union[Unset, AppComponentConfigConnection] - if isinstance(_component_config, Unset): - component_config = UNSET - else: - component_config = AppComponentConfigConnection.from_dict(_component_config) - - component_id = d.pop("component_id", UNSET) - - component_name = d.pop("component_name", UNSET) - - dependencies = [] - _dependencies = d.pop("dependencies", UNSET) - for dependencies_item_data in _dependencies or []: - dependencies_item = AppComponent.from_dict(dependencies_item_data) - - dependencies.append(dependencies_item) - - _deploy_status = d.pop("deploy_status", UNSET) - deploy_status: Union[Unset, AppInstallDeployStatus] - if isinstance(_deploy_status, Unset): - deploy_status = UNSET - else: - deploy_status = AppInstallDeployStatus(_deploy_status) - - deploy_status_description = d.pop("deploy_status_description", UNSET) - - id = d.pop("id", UNSET) - - app_install_component_summary = cls( - build_status=build_status, - build_status_description=build_status_description, - component_config=component_config, - component_id=component_id, - component_name=component_name, - dependencies=dependencies, - deploy_status=deploy_status, - deploy_status_description=deploy_status_description, - id=id, - ) - - app_install_component_summary.additional_properties = d - return app_install_component_summary - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_config.py b/nuon/models/app_install_config.py deleted file mode 100644 index 5b804f90..00000000 --- a/nuon/models/app_install_config.py +++ /dev/null @@ -1,121 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_approval_option import AppInstallApprovalOption -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppInstallConfig") - - -@_attrs_define -class AppInstallConfig: - """ - Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_option: Union[Unset, str] = UNSET - if not isinstance(self.approval_option, Unset): - approval_option = self.approval_option.value - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if approval_option is not UNSET: - field_dict["approval_option"] = approval_option - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - _approval_option = d.pop("approval_option", UNSET) - approval_option: Union[Unset, AppInstallApprovalOption] - if isinstance(_approval_option, Unset): - approval_option = UNSET - else: - approval_option = AppInstallApprovalOption(_approval_option) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_install_config = cls( - approval_option=approval_option, - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - org_id=org_id, - updated_at=updated_at, - ) - - app_install_config.additional_properties = d - return app_install_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_deploy.py b/nuon/models/app_install_deploy.py deleted file mode 100644 index c12cfbb5..00000000 --- a/nuon/models/app_install_deploy.py +++ /dev/null @@ -1,374 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_deploy_type import AppInstallDeployType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_component_build import AppComponentBuild - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - from ..models.app_install_deploy_outputs import AppInstallDeployOutputs - from ..models.app_log_stream import AppLogStream - from ..models.app_oci_artifact import AppOCIArtifact - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow import AppWorkflow - - -T = TypeVar("T", bound="AppInstallDeploy") - - -@_attrs_define -class AppInstallDeploy: - """ - Attributes: - action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - build_id (Union[Unset, str]): - component_build (Union[Unset, AppComponentBuild]): - component_config_version (Union[Unset, int]): - component_id (Union[Unset, str]): - component_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_component_id (Union[Unset, str]): - install_deploy_type (Union[Unset, AppInstallDeployType]): - install_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery - install_workflow_id (Union[Unset, str]): DEPRECATED: use WorkflowID - log_stream (Union[Unset, AppLogStream]): - oci_artifact (Union[Unset, AppOCIArtifact]): - outputs (Union[Unset, AppInstallDeployOutputs]): - release_id (Union[Unset, str]): - runner_jobs (Union[Unset, list['AppRunnerJob']]): runner details - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - workflow (Union[Unset, AppWorkflow]): - workflow_id (Union[Unset, str]): - """ - - action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - build_id: Union[Unset, str] = UNSET - component_build: Union[Unset, "AppComponentBuild"] = UNSET - component_config_version: Union[Unset, int] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_component_id: Union[Unset, str] = UNSET - install_deploy_type: Union[Unset, AppInstallDeployType] = UNSET - install_id: Union[Unset, str] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - oci_artifact: Union[Unset, "AppOCIArtifact"] = UNSET - outputs: Union[Unset, "AppInstallDeployOutputs"] = UNSET - release_id: Union[Unset, str] = UNSET - runner_jobs: Union[Unset, list["AppRunnerJob"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow: Union[Unset, "AppWorkflow"] = UNSET - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.action_workflow_runs, Unset): - action_workflow_runs = [] - for action_workflow_runs_item_data in self.action_workflow_runs: - action_workflow_runs_item = action_workflow_runs_item_data.to_dict() - action_workflow_runs.append(action_workflow_runs_item) - - build_id = self.build_id - - component_build: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.component_build, Unset): - component_build = self.component_build.to_dict() - - component_config_version = self.component_config_version - - component_id = self.component_id - - component_name = self.component_name - - created_at = self.created_at - - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_by_id = self.created_by_id - - id = self.id - - install_component_id = self.install_component_id - - install_deploy_type: Union[Unset, str] = UNSET - if not isinstance(self.install_deploy_type, Unset): - install_deploy_type = self.install_deploy_type.value - - install_id = self.install_id - - install_workflow_id = self.install_workflow_id - - log_stream: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.log_stream, Unset): - log_stream = self.log_stream.to_dict() - - oci_artifact: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.oci_artifact, Unset): - oci_artifact = self.oci_artifact.to_dict() - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - release_id = self.release_id - - runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.runner_jobs, Unset): - runner_jobs = [] - for runner_jobs_item_data in self.runner_jobs: - runner_jobs_item = runner_jobs_item_data.to_dict() - runner_jobs.append(runner_jobs_item) - - status = self.status - - status_description = self.status_description - - status_v2: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status_v2, Unset): - status_v2 = self.status_v2.to_dict() - - updated_at = self.updated_at - - workflow: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.workflow, Unset): - workflow = self.workflow.to_dict() - - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_runs is not UNSET: - field_dict["action_workflow_runs"] = action_workflow_runs - if build_id is not UNSET: - field_dict["build_id"] = build_id - if component_build is not UNSET: - field_dict["component_build"] = component_build - if component_config_version is not UNSET: - field_dict["component_config_version"] = component_config_version - if component_id is not UNSET: - field_dict["component_id"] = component_id - if component_name is not UNSET: - field_dict["component_name"] = component_name - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by is not UNSET: - field_dict["created_by"] = created_by - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_component_id is not UNSET: - field_dict["install_component_id"] = install_component_id - if install_deploy_type is not UNSET: - field_dict["install_deploy_type"] = install_deploy_type - if install_id is not UNSET: - field_dict["install_id"] = install_id - if install_workflow_id is not UNSET: - field_dict["install_workflow_id"] = install_workflow_id - if log_stream is not UNSET: - field_dict["log_stream"] = log_stream - if oci_artifact is not UNSET: - field_dict["oci_artifact"] = oci_artifact - if outputs is not UNSET: - field_dict["outputs"] = outputs - if release_id is not UNSET: - field_dict["release_id"] = release_id - if runner_jobs is not UNSET: - field_dict["runner_jobs"] = runner_jobs - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if status_v2 is not UNSET: - field_dict["status_v2"] = status_v2 - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflow is not UNSET: - field_dict["workflow"] = workflow - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_component_build import AppComponentBuild - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - from ..models.app_install_deploy_outputs import AppInstallDeployOutputs - from ..models.app_log_stream import AppLogStream - from ..models.app_oci_artifact import AppOCIArtifact - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow import AppWorkflow - - d = dict(src_dict) - action_workflow_runs = [] - _action_workflow_runs = d.pop("action_workflow_runs", UNSET) - for action_workflow_runs_item_data in _action_workflow_runs or []: - action_workflow_runs_item = AppInstallActionWorkflowRun.from_dict(action_workflow_runs_item_data) - - action_workflow_runs.append(action_workflow_runs_item) - - build_id = d.pop("build_id", UNSET) - - _component_build = d.pop("component_build", UNSET) - component_build: Union[Unset, AppComponentBuild] - if isinstance(_component_build, Unset): - component_build = UNSET - else: - component_build = AppComponentBuild.from_dict(_component_build) - - component_config_version = d.pop("component_config_version", UNSET) - - component_id = d.pop("component_id", UNSET) - - component_name = d.pop("component_name", UNSET) - - created_at = d.pop("created_at", UNSET) - - _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_component_id = d.pop("install_component_id", UNSET) - - _install_deploy_type = d.pop("install_deploy_type", UNSET) - install_deploy_type: Union[Unset, AppInstallDeployType] - if isinstance(_install_deploy_type, Unset): - install_deploy_type = UNSET - else: - install_deploy_type = AppInstallDeployType(_install_deploy_type) - - install_id = d.pop("install_id", UNSET) - - install_workflow_id = d.pop("install_workflow_id", UNSET) - - _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] - if isinstance(_log_stream, Unset): - log_stream = UNSET - else: - log_stream = AppLogStream.from_dict(_log_stream) - - _oci_artifact = d.pop("oci_artifact", UNSET) - oci_artifact: Union[Unset, AppOCIArtifact] - if isinstance(_oci_artifact, Unset): - oci_artifact = UNSET - else: - oci_artifact = AppOCIArtifact.from_dict(_oci_artifact) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppInstallDeployOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = AppInstallDeployOutputs.from_dict(_outputs) - - release_id = d.pop("release_id", UNSET) - - runner_jobs = [] - _runner_jobs = d.pop("runner_jobs", UNSET) - for runner_jobs_item_data in _runner_jobs or []: - runner_jobs_item = AppRunnerJob.from_dict(runner_jobs_item_data) - - runner_jobs.append(runner_jobs_item) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] - if isinstance(_status_v2, Unset): - status_v2 = UNSET - else: - status_v2 = AppCompositeStatus.from_dict(_status_v2) - - updated_at = d.pop("updated_at", UNSET) - - _workflow = d.pop("workflow", UNSET) - workflow: Union[Unset, AppWorkflow] - if isinstance(_workflow, Unset): - workflow = UNSET - else: - workflow = AppWorkflow.from_dict(_workflow) - - workflow_id = d.pop("workflow_id", UNSET) - - app_install_deploy = cls( - action_workflow_runs=action_workflow_runs, - build_id=build_id, - component_build=component_build, - component_config_version=component_config_version, - component_id=component_id, - component_name=component_name, - created_at=created_at, - created_by=created_by, - created_by_id=created_by_id, - id=id, - install_component_id=install_component_id, - install_deploy_type=install_deploy_type, - install_id=install_id, - install_workflow_id=install_workflow_id, - log_stream=log_stream, - oci_artifact=oci_artifact, - outputs=outputs, - release_id=release_id, - runner_jobs=runner_jobs, - status=status, - status_description=status_description, - status_v2=status_v2, - updated_at=updated_at, - workflow=workflow, - workflow_id=workflow_id, - ) - - app_install_deploy.additional_properties = d - return app_install_deploy - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_deploy_outputs.py b/nuon/models/app_install_deploy_outputs.py deleted file mode 100644 index 5c32635c..00000000 --- a/nuon/models/app_install_deploy_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallDeployOutputs") - - -@_attrs_define -class AppInstallDeployOutputs: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_deploy_outputs = cls() - - app_install_deploy_outputs.additional_properties = d - return app_install_deploy_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_deploy_status.py b/nuon/models/app_install_deploy_status.py deleted file mode 100644 index b4273baf..00000000 --- a/nuon/models/app_install_deploy_status.py +++ /dev/null @@ -1,20 +0,0 @@ -from enum import Enum - - -class AppInstallDeployStatus(str, Enum): - ACTIVE = "active" - APPROVAL_DENIED = "approval-denied" - CANCELLED = "cancelled" - ERROR = "error" - EXECUTING = "executing" - INACTIVE = "inactive" - NOOP = "noop" - PENDING = "pending" - PENDING_APPROVAL = "pending-approval" - PLANNING = "planning" - QUEUED = "queued" - SYNCING = "syncing" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_install_deploy_type.py b/nuon/models/app_install_deploy_type.py deleted file mode 100644 index 4ffef6d4..00000000 --- a/nuon/models/app_install_deploy_type.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class AppInstallDeployType(str, Enum): - APPLY = "apply" - SYNC_IMAGE = "sync-image" - TEARDOWN = "teardown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_install_event.py b/nuon/models/app_install_event.py deleted file mode 100644 index 76c84931..00000000 --- a/nuon/models/app_install_event.py +++ /dev/null @@ -1,161 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_operation_status import AppOperationStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_install_event_payload import AppInstallEventPayload - - -T = TypeVar("T", bound="AppInstallEvent") - - -@_attrs_define -class AppInstallEvent: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - operation (Union[Unset, str]): - operation_name (Union[Unset, str]): - operation_status (Union[Unset, AppOperationStatus]): - org_id (Union[Unset, str]): - payload (Union[Unset, AppInstallEventPayload]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - operation: Union[Unset, str] = UNSET - operation_name: Union[Unset, str] = UNSET - operation_status: Union[Unset, AppOperationStatus] = UNSET - org_id: Union[Unset, str] = UNSET - payload: Union[Unset, "AppInstallEventPayload"] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - operation = self.operation - - operation_name = self.operation_name - - operation_status: Union[Unset, str] = UNSET - if not isinstance(self.operation_status, Unset): - operation_status = self.operation_status.value - - org_id = self.org_id - - payload: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.payload, Unset): - payload = self.payload.to_dict() - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if operation is not UNSET: - field_dict["operation"] = operation - if operation_name is not UNSET: - field_dict["operation_name"] = operation_name - if operation_status is not UNSET: - field_dict["operation_status"] = operation_status - if org_id is not UNSET: - field_dict["org_id"] = org_id - if payload is not UNSET: - field_dict["payload"] = payload - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_install_event_payload import AppInstallEventPayload - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - operation = d.pop("operation", UNSET) - - operation_name = d.pop("operation_name", UNSET) - - _operation_status = d.pop("operation_status", UNSET) - operation_status: Union[Unset, AppOperationStatus] - if isinstance(_operation_status, Unset): - operation_status = UNSET - else: - operation_status = AppOperationStatus(_operation_status) - - org_id = d.pop("org_id", UNSET) - - _payload = d.pop("payload", UNSET) - payload: Union[Unset, AppInstallEventPayload] - if isinstance(_payload, Unset): - payload = UNSET - else: - payload = AppInstallEventPayload.from_dict(_payload) - - updated_at = d.pop("updated_at", UNSET) - - app_install_event = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - operation=operation, - operation_name=operation_name, - operation_status=operation_status, - org_id=org_id, - payload=payload, - updated_at=updated_at, - ) - - app_install_event.additional_properties = d - return app_install_event - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_event_payload.py b/nuon/models/app_install_event_payload.py deleted file mode 100644 index c9ca4b40..00000000 --- a/nuon/models/app_install_event_payload.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallEventPayload") - - -@_attrs_define -class AppInstallEventPayload: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_event_payload = cls() - - app_install_event_payload.additional_properties = d - return app_install_event_payload - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_inputs.py b/nuon/models/app_install_inputs.py deleted file mode 100644 index 953fe32d..00000000 --- a/nuon/models/app_install_inputs.py +++ /dev/null @@ -1,153 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_install_inputs_redacted_values import AppInstallInputsRedactedValues - from ..models.app_install_inputs_values import AppInstallInputsValues - - -T = TypeVar("T", bound="AppInstallInputs") - - -@_attrs_define -class AppInstallInputs: - """ - Attributes: - app_input_config_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - org_id (Union[Unset, str]): - redacted_values (Union[Unset, AppInstallInputsRedactedValues]): - updated_at (Union[Unset, str]): - values (Union[Unset, AppInstallInputsValues]): - """ - - app_input_config_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - redacted_values: Union[Unset, "AppInstallInputsRedactedValues"] = UNSET - updated_at: Union[Unset, str] = UNSET - values: Union[Unset, "AppInstallInputsValues"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_input_config_id = self.app_input_config_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - org_id = self.org_id - - redacted_values: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.redacted_values, Unset): - redacted_values = self.redacted_values.to_dict() - - updated_at = self.updated_at - - values: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.values, Unset): - values = self.values.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_input_config_id is not UNSET: - field_dict["app_input_config_id"] = app_input_config_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if redacted_values is not UNSET: - field_dict["redacted_values"] = redacted_values - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if values is not UNSET: - field_dict["values"] = values - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_install_inputs_redacted_values import AppInstallInputsRedactedValues - from ..models.app_install_inputs_values import AppInstallInputsValues - - d = dict(src_dict) - app_input_config_id = d.pop("app_input_config_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - org_id = d.pop("org_id", UNSET) - - _redacted_values = d.pop("redacted_values", UNSET) - redacted_values: Union[Unset, AppInstallInputsRedactedValues] - if isinstance(_redacted_values, Unset): - redacted_values = UNSET - else: - redacted_values = AppInstallInputsRedactedValues.from_dict(_redacted_values) - - updated_at = d.pop("updated_at", UNSET) - - _values = d.pop("values", UNSET) - values: Union[Unset, AppInstallInputsValues] - if isinstance(_values, Unset): - values = UNSET - else: - values = AppInstallInputsValues.from_dict(_values) - - app_install_inputs = cls( - app_input_config_id=app_input_config_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - org_id=org_id, - redacted_values=redacted_values, - updated_at=updated_at, - values=values, - ) - - app_install_inputs.additional_properties = d - return app_install_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_inputs_redacted_values.py b/nuon/models/app_install_inputs_redacted_values.py deleted file mode 100644 index a1a9a94c..00000000 --- a/nuon/models/app_install_inputs_redacted_values.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallInputsRedactedValues") - - -@_attrs_define -class AppInstallInputsRedactedValues: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_inputs_redacted_values = cls() - - app_install_inputs_redacted_values.additional_properties = d - return app_install_inputs_redacted_values - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_inputs_values.py b/nuon/models/app_install_inputs_values.py deleted file mode 100644 index 0f61048a..00000000 --- a/nuon/models/app_install_inputs_values.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallInputsValues") - - -@_attrs_define -class AppInstallInputsValues: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_inputs_values = cls() - - app_install_inputs_values.additional_properties = d - return app_install_inputs_values - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_links.py b/nuon/models/app_install_links.py deleted file mode 100644 index 5daf3145..00000000 --- a/nuon/models/app_install_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallLinks") - - -@_attrs_define -class AppInstallLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_links = cls() - - app_install_links.additional_properties = d - return app_install_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_sandbox.py b/nuon/models/app_install_sandbox.py deleted file mode 100644 index 33c2d2db..00000000 --- a/nuon/models/app_install_sandbox.py +++ /dev/null @@ -1,174 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_sandbox_run import AppInstallSandboxRun - from ..models.app_terraform_workspace import AppTerraformWorkspace - - -T = TypeVar("T", bound="AppInstallSandbox") - - -@_attrs_define -class AppInstallSandbox: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - terraform_workspace (Union[Unset, AppTerraformWorkspace]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_sandbox_runs, Unset): - install_sandbox_runs = [] - for install_sandbox_runs_item_data in self.install_sandbox_runs: - install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() - install_sandbox_runs.append(install_sandbox_runs_item) - - status = self.status - - status_description = self.status_description - - status_v2: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status_v2, Unset): - status_v2 = self.status_v2.to_dict() - - terraform_workspace: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.terraform_workspace, Unset): - terraform_workspace = self.terraform_workspace.to_dict() - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if install_sandbox_runs is not UNSET: - field_dict["install_sandbox_runs"] = install_sandbox_runs - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if status_v2 is not UNSET: - field_dict["status_v2"] = status_v2 - if terraform_workspace is not UNSET: - field_dict["terraform_workspace"] = terraform_workspace - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_sandbox_run import AppInstallSandboxRun - from ..models.app_terraform_workspace import AppTerraformWorkspace - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - install_sandbox_runs = [] - _install_sandbox_runs = d.pop("install_sandbox_runs", UNSET) - for install_sandbox_runs_item_data in _install_sandbox_runs or []: - install_sandbox_runs_item = AppInstallSandboxRun.from_dict(install_sandbox_runs_item_data) - - install_sandbox_runs.append(install_sandbox_runs_item) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] - if isinstance(_status_v2, Unset): - status_v2 = UNSET - else: - status_v2 = AppCompositeStatus.from_dict(_status_v2) - - _terraform_workspace = d.pop("terraform_workspace", UNSET) - terraform_workspace: Union[Unset, AppTerraformWorkspace] - if isinstance(_terraform_workspace, Unset): - terraform_workspace = UNSET - else: - terraform_workspace = AppTerraformWorkspace.from_dict(_terraform_workspace) - - updated_at = d.pop("updated_at", UNSET) - - app_install_sandbox = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - install_sandbox_runs=install_sandbox_runs, - status=status, - status_description=status_description, - status_v2=status_v2, - terraform_workspace=terraform_workspace, - updated_at=updated_at, - ) - - app_install_sandbox.additional_properties = d - return app_install_sandbox - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_sandbox_run.py b/nuon/models/app_install_sandbox_run.py deleted file mode 100644 index c0de2d52..00000000 --- a/nuon/models/app_install_sandbox_run.py +++ /dev/null @@ -1,311 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_sandbox_run_type import AppSandboxRunType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - from ..models.app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs - from ..models.app_log_stream import AppLogStream - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow import AppWorkflow - - -T = TypeVar("T", bound="AppInstallSandboxRun") - - -@_attrs_define -class AppInstallSandboxRun: - """ - Attributes: - action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - app_sandbox_config (Union[Unset, AppAppSandboxConfig]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_sandbox_id (Union[Unset, str]): TODO: once we run a backfill we can make this non pointer - install_workflow_id (Union[Unset, str]): - log_stream (Union[Unset, AppLogStream]): - outputs (Union[Unset, AppInstallSandboxRunOutputs]): - run_type (Union[Unset, AppSandboxRunType]): - runner_jobs (Union[Unset, list['AppRunnerJob']]): runner details - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - workflow (Union[Unset, AppWorkflow]): - workflow_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery - """ - - action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - app_sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_sandbox_id: Union[Unset, str] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - outputs: Union[Unset, "AppInstallSandboxRunOutputs"] = UNSET - run_type: Union[Unset, AppSandboxRunType] = UNSET - runner_jobs: Union[Unset, list["AppRunnerJob"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow: Union[Unset, "AppWorkflow"] = UNSET - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.action_workflow_runs, Unset): - action_workflow_runs = [] - for action_workflow_runs_item_data in self.action_workflow_runs: - action_workflow_runs_item = action_workflow_runs_item_data.to_dict() - action_workflow_runs.append(action_workflow_runs_item) - - app_sandbox_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.app_sandbox_config, Unset): - app_sandbox_config = self.app_sandbox_config.to_dict() - - created_at = self.created_at - - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - install_sandbox_id = self.install_sandbox_id - - install_workflow_id = self.install_workflow_id - - log_stream: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.log_stream, Unset): - log_stream = self.log_stream.to_dict() - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - run_type: Union[Unset, str] = UNSET - if not isinstance(self.run_type, Unset): - run_type = self.run_type.value - - runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.runner_jobs, Unset): - runner_jobs = [] - for runner_jobs_item_data in self.runner_jobs: - runner_jobs_item = runner_jobs_item_data.to_dict() - runner_jobs.append(runner_jobs_item) - - status = self.status - - status_description = self.status_description - - status_v2: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status_v2, Unset): - status_v2 = self.status_v2.to_dict() - - updated_at = self.updated_at - - workflow: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.workflow, Unset): - workflow = self.workflow.to_dict() - - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_runs is not UNSET: - field_dict["action_workflow_runs"] = action_workflow_runs - if app_sandbox_config is not UNSET: - field_dict["app_sandbox_config"] = app_sandbox_config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by is not UNSET: - field_dict["created_by"] = created_by - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if install_sandbox_id is not UNSET: - field_dict["install_sandbox_id"] = install_sandbox_id - if install_workflow_id is not UNSET: - field_dict["install_workflow_id"] = install_workflow_id - if log_stream is not UNSET: - field_dict["log_stream"] = log_stream - if outputs is not UNSET: - field_dict["outputs"] = outputs - if run_type is not UNSET: - field_dict["run_type"] = run_type - if runner_jobs is not UNSET: - field_dict["runner_jobs"] = runner_jobs - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if status_v2 is not UNSET: - field_dict["status_v2"] = status_v2 - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflow is not UNSET: - field_dict["workflow"] = workflow - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_app_sandbox_config import AppAppSandboxConfig - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - from ..models.app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs - from ..models.app_log_stream import AppLogStream - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow import AppWorkflow - - d = dict(src_dict) - action_workflow_runs = [] - _action_workflow_runs = d.pop("action_workflow_runs", UNSET) - for action_workflow_runs_item_data in _action_workflow_runs or []: - action_workflow_runs_item = AppInstallActionWorkflowRun.from_dict(action_workflow_runs_item_data) - - action_workflow_runs.append(action_workflow_runs_item) - - _app_sandbox_config = d.pop("app_sandbox_config", UNSET) - app_sandbox_config: Union[Unset, AppAppSandboxConfig] - if isinstance(_app_sandbox_config, Unset): - app_sandbox_config = UNSET - else: - app_sandbox_config = AppAppSandboxConfig.from_dict(_app_sandbox_config) - - created_at = d.pop("created_at", UNSET) - - _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - install_sandbox_id = d.pop("install_sandbox_id", UNSET) - - install_workflow_id = d.pop("install_workflow_id", UNSET) - - _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] - if isinstance(_log_stream, Unset): - log_stream = UNSET - else: - log_stream = AppLogStream.from_dict(_log_stream) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppInstallSandboxRunOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = AppInstallSandboxRunOutputs.from_dict(_outputs) - - _run_type = d.pop("run_type", UNSET) - run_type: Union[Unset, AppSandboxRunType] - if isinstance(_run_type, Unset): - run_type = UNSET - else: - run_type = AppSandboxRunType(_run_type) - - runner_jobs = [] - _runner_jobs = d.pop("runner_jobs", UNSET) - for runner_jobs_item_data in _runner_jobs or []: - runner_jobs_item = AppRunnerJob.from_dict(runner_jobs_item_data) - - runner_jobs.append(runner_jobs_item) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] - if isinstance(_status_v2, Unset): - status_v2 = UNSET - else: - status_v2 = AppCompositeStatus.from_dict(_status_v2) - - updated_at = d.pop("updated_at", UNSET) - - _workflow = d.pop("workflow", UNSET) - workflow: Union[Unset, AppWorkflow] - if isinstance(_workflow, Unset): - workflow = UNSET - else: - workflow = AppWorkflow.from_dict(_workflow) - - workflow_id = d.pop("workflow_id", UNSET) - - app_install_sandbox_run = cls( - action_workflow_runs=action_workflow_runs, - app_sandbox_config=app_sandbox_config, - created_at=created_at, - created_by=created_by, - created_by_id=created_by_id, - id=id, - install_id=install_id, - install_sandbox_id=install_sandbox_id, - install_workflow_id=install_workflow_id, - log_stream=log_stream, - outputs=outputs, - run_type=run_type, - runner_jobs=runner_jobs, - status=status, - status_description=status_description, - status_v2=status_v2, - updated_at=updated_at, - workflow=workflow, - workflow_id=workflow_id, - ) - - app_install_sandbox_run.additional_properties = d - return app_install_sandbox_run - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_sandbox_run_outputs.py b/nuon/models/app_install_sandbox_run_outputs.py deleted file mode 100644 index 7eb0d92a..00000000 --- a/nuon/models/app_install_sandbox_run_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallSandboxRunOutputs") - - -@_attrs_define -class AppInstallSandboxRunOutputs: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_sandbox_run_outputs = cls() - - app_install_sandbox_run_outputs.additional_properties = d - return app_install_sandbox_run_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_stack.py b/nuon/models/app_install_stack.py deleted file mode 100644 index 9b8ac9f4..00000000 --- a/nuon/models/app_install_stack.py +++ /dev/null @@ -1,147 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_install_stack_outputs import AppInstallStackOutputs - from ..models.app_install_stack_version import AppInstallStackVersion - - -T = TypeVar("T", bound="AppInstallStack") - - -@_attrs_define -class AppInstallStack: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_stack_outputs (Union[Unset, AppInstallStackOutputs]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - versions (Union[Unset, list['AppInstallStackVersion']]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_stack_outputs: Union[Unset, "AppInstallStackOutputs"] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - versions: Union[Unset, list["AppInstallStackVersion"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - install_stack_outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_stack_outputs, Unset): - install_stack_outputs = self.install_stack_outputs.to_dict() - - org_id = self.org_id - - updated_at = self.updated_at - - versions: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.versions, Unset): - versions = [] - for versions_item_data in self.versions: - versions_item = versions_item_data.to_dict() - versions.append(versions_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if install_stack_outputs is not UNSET: - field_dict["install_stack_outputs"] = install_stack_outputs - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if versions is not UNSET: - field_dict["versions"] = versions - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_install_stack_outputs import AppInstallStackOutputs - from ..models.app_install_stack_version import AppInstallStackVersion - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - _install_stack_outputs = d.pop("install_stack_outputs", UNSET) - install_stack_outputs: Union[Unset, AppInstallStackOutputs] - if isinstance(_install_stack_outputs, Unset): - install_stack_outputs = UNSET - else: - install_stack_outputs = AppInstallStackOutputs.from_dict(_install_stack_outputs) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - versions = [] - _versions = d.pop("versions", UNSET) - for versions_item_data in _versions or []: - versions_item = AppInstallStackVersion.from_dict(versions_item_data) - - versions.append(versions_item) - - app_install_stack = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - install_stack_outputs=install_stack_outputs, - org_id=org_id, - updated_at=updated_at, - versions=versions, - ) - - app_install_stack.additional_properties = d - return app_install_stack - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_stack_outputs.py b/nuon/models/app_install_stack_outputs.py deleted file mode 100644 index 90e6b4dc..00000000 --- a/nuon/models/app_install_stack_outputs.py +++ /dev/null @@ -1,171 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_aws_stack_outputs import AppAWSStackOutputs - from ..models.app_azure_stack_outputs import AppAzureStackOutputs - from ..models.app_install_stack_outputs_data import AppInstallStackOutputsData - - -T = TypeVar("T", bound="AppInstallStackOutputs") - - -@_attrs_define -class AppInstallStackOutputs: - """ - Attributes: - aws (Union[Unset, AppAWSStackOutputs]): - azure (Union[Unset, AppAzureStackOutputs]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - data (Union[Unset, AppInstallStackOutputsData]): - id (Union[Unset, str]): - install_stack_id (Union[Unset, str]): - install_version_run_id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - aws: Union[Unset, "AppAWSStackOutputs"] = UNSET - azure: Union[Unset, "AppAzureStackOutputs"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - data: Union[Unset, "AppInstallStackOutputsData"] = UNSET - id: Union[Unset, str] = UNSET - install_stack_id: Union[Unset, str] = UNSET - install_version_run_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws, Unset): - aws = self.aws.to_dict() - - azure: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.azure, Unset): - azure = self.azure.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - data: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.data, Unset): - data = self.data.to_dict() - - id = self.id - - install_stack_id = self.install_stack_id - - install_version_run_id = self.install_version_run_id - - org_id = self.org_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws is not UNSET: - field_dict["aws"] = aws - if azure is not UNSET: - field_dict["azure"] = azure - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if data is not UNSET: - field_dict["data"] = data - if id is not UNSET: - field_dict["id"] = id - if install_stack_id is not UNSET: - field_dict["install_stack_id"] = install_stack_id - if install_version_run_id is not UNSET: - field_dict["install_version_run_id"] = install_version_run_id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_aws_stack_outputs import AppAWSStackOutputs - from ..models.app_azure_stack_outputs import AppAzureStackOutputs - from ..models.app_install_stack_outputs_data import AppInstallStackOutputsData - - d = dict(src_dict) - _aws = d.pop("aws", UNSET) - aws: Union[Unset, AppAWSStackOutputs] - if isinstance(_aws, Unset): - aws = UNSET - else: - aws = AppAWSStackOutputs.from_dict(_aws) - - _azure = d.pop("azure", UNSET) - azure: Union[Unset, AppAzureStackOutputs] - if isinstance(_azure, Unset): - azure = UNSET - else: - azure = AppAzureStackOutputs.from_dict(_azure) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _data = d.pop("data", UNSET) - data: Union[Unset, AppInstallStackOutputsData] - if isinstance(_data, Unset): - data = UNSET - else: - data = AppInstallStackOutputsData.from_dict(_data) - - id = d.pop("id", UNSET) - - install_stack_id = d.pop("install_stack_id", UNSET) - - install_version_run_id = d.pop("install_version_run_id", UNSET) - - org_id = d.pop("org_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_install_stack_outputs = cls( - aws=aws, - azure=azure, - created_at=created_at, - created_by_id=created_by_id, - data=data, - id=id, - install_stack_id=install_stack_id, - install_version_run_id=install_version_run_id, - org_id=org_id, - updated_at=updated_at, - ) - - app_install_stack_outputs.additional_properties = d - return app_install_stack_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_stack_outputs_data.py b/nuon/models/app_install_stack_outputs_data.py deleted file mode 100644 index 2246ce36..00000000 --- a/nuon/models/app_install_stack_outputs_data.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallStackOutputsData") - - -@_attrs_define -class AppInstallStackOutputsData: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_stack_outputs_data = cls() - - app_install_stack_outputs_data.additional_properties = d - return app_install_stack_outputs_data - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version.py b/nuon/models/app_install_stack_version.py deleted file mode 100644 index 5b744cc2..00000000 --- a/nuon/models/app_install_stack_version.py +++ /dev/null @@ -1,237 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_stack_version_run import AppInstallStackVersionRun - - -T = TypeVar("T", bound="AppInstallStackVersion") - - -@_attrs_define -class AppInstallStackVersion: - """ - Attributes: - app_config_id (Union[Unset, str]): - aws_bucket_key (Union[Unset, str]): - aws_bucket_name (Union[Unset, str]): aws configuration parameters - checksum (Union[Unset, str]): - composite_status (Union[Unset, AppCompositeStatus]): - contents (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_stack_id (Union[Unset, str]): - org_id (Union[Unset, str]): - phone_home_id (Union[Unset, str]): - phone_home_url (Union[Unset, str]): - quick_link_url (Union[Unset, str]): - runs (Union[Unset, list['AppInstallStackVersionRun']]): - template_url (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - app_config_id: Union[Unset, str] = UNSET - aws_bucket_key: Union[Unset, str] = UNSET - aws_bucket_name: Union[Unset, str] = UNSET - checksum: Union[Unset, str] = UNSET - composite_status: Union[Unset, "AppCompositeStatus"] = UNSET - contents: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_stack_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - phone_home_id: Union[Unset, str] = UNSET - phone_home_url: Union[Unset, str] = UNSET - quick_link_url: Union[Unset, str] = UNSET - runs: Union[Unset, list["AppInstallStackVersionRun"]] = UNSET - template_url: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - aws_bucket_key = self.aws_bucket_key - - aws_bucket_name = self.aws_bucket_name - - checksum = self.checksum - - composite_status: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.composite_status, Unset): - composite_status = self.composite_status.to_dict() - - contents = self.contents - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - install_stack_id = self.install_stack_id - - org_id = self.org_id - - phone_home_id = self.phone_home_id - - phone_home_url = self.phone_home_url - - quick_link_url = self.quick_link_url - - runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.runs, Unset): - runs = [] - for runs_item_data in self.runs: - runs_item = runs_item_data.to_dict() - runs.append(runs_item) - - template_url = self.template_url - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if aws_bucket_key is not UNSET: - field_dict["aws_bucket_key"] = aws_bucket_key - if aws_bucket_name is not UNSET: - field_dict["aws_bucket_name"] = aws_bucket_name - if checksum is not UNSET: - field_dict["checksum"] = checksum - if composite_status is not UNSET: - field_dict["composite_status"] = composite_status - if contents is not UNSET: - field_dict["contents"] = contents - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if install_stack_id is not UNSET: - field_dict["install_stack_id"] = install_stack_id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if phone_home_id is not UNSET: - field_dict["phone_home_id"] = phone_home_id - if phone_home_url is not UNSET: - field_dict["phone_home_url"] = phone_home_url - if quick_link_url is not UNSET: - field_dict["quick_link_url"] = quick_link_url - if runs is not UNSET: - field_dict["runs"] = runs - if template_url is not UNSET: - field_dict["template_url"] = template_url - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_stack_version_run import AppInstallStackVersionRun - - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - aws_bucket_key = d.pop("aws_bucket_key", UNSET) - - aws_bucket_name = d.pop("aws_bucket_name", UNSET) - - checksum = d.pop("checksum", UNSET) - - _composite_status = d.pop("composite_status", UNSET) - composite_status: Union[Unset, AppCompositeStatus] - if isinstance(_composite_status, Unset): - composite_status = UNSET - else: - composite_status = AppCompositeStatus.from_dict(_composite_status) - - contents = d.pop("contents", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - install_stack_id = d.pop("install_stack_id", UNSET) - - org_id = d.pop("org_id", UNSET) - - phone_home_id = d.pop("phone_home_id", UNSET) - - phone_home_url = d.pop("phone_home_url", UNSET) - - quick_link_url = d.pop("quick_link_url", UNSET) - - runs = [] - _runs = d.pop("runs", UNSET) - for runs_item_data in _runs or []: - runs_item = AppInstallStackVersionRun.from_dict(runs_item_data) - - runs.append(runs_item) - - template_url = d.pop("template_url", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_install_stack_version = cls( - app_config_id=app_config_id, - aws_bucket_key=aws_bucket_key, - aws_bucket_name=aws_bucket_name, - checksum=checksum, - composite_status=composite_status, - contents=contents, - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - install_stack_id=install_stack_id, - org_id=org_id, - phone_home_id=phone_home_id, - phone_home_url=phone_home_url, - quick_link_url=quick_link_url, - runs=runs, - template_url=template_url, - updated_at=updated_at, - ) - - app_install_stack_version.additional_properties = d - return app_install_stack_version - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version_run.py b/nuon/models/app_install_stack_version_run.py deleted file mode 100644 index a15a3158..00000000 --- a/nuon/models/app_install_stack_version_run.py +++ /dev/null @@ -1,108 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_install_stack_version_run_data import AppInstallStackVersionRunData - - -T = TypeVar("T", bound="AppInstallStackVersionRun") - - -@_attrs_define -class AppInstallStackVersionRun: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - data (Union[Unset, AppInstallStackVersionRunData]): - id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - data: Union[Unset, "AppInstallStackVersionRunData"] = UNSET - id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - data: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.data, Unset): - data = self.data.to_dict() - - id = self.id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if data is not UNSET: - field_dict["data"] = data - if id is not UNSET: - field_dict["id"] = id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_install_stack_version_run_data import AppInstallStackVersionRunData - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _data = d.pop("data", UNSET) - data: Union[Unset, AppInstallStackVersionRunData] - if isinstance(_data, Unset): - data = UNSET - else: - data = AppInstallStackVersionRunData.from_dict(_data) - - id = d.pop("id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_install_stack_version_run = cls( - created_at=created_at, - created_by_id=created_by_id, - data=data, - id=id, - updated_at=updated_at, - ) - - app_install_stack_version_run.additional_properties = d - return app_install_stack_version_run - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version_run_data.py b/nuon/models/app_install_stack_version_run_data.py deleted file mode 100644 index 5da3fe66..00000000 --- a/nuon/models/app_install_stack_version_run_data.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppInstallStackVersionRunData") - - -@_attrs_define -class AppInstallStackVersionRunData: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_install_stack_version_run_data = cls() - - app_install_stack_version_run_data.additional_properties = d - return app_install_stack_version_run_data - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_install_state.py b/nuon/models/app_install_state.py deleted file mode 100644 index c4f13ef4..00000000 --- a/nuon/models/app_install_state.py +++ /dev/null @@ -1,140 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppInstallState") - - -@_attrs_define -class AppInstallState: - """ - Attributes: - archived (Union[Unset, bool]): - contents (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - triggered_by_id (Union[Unset, str]): - triggered_by_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - version (Union[Unset, int]): - """ - - archived: Union[Unset, bool] = UNSET - contents: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - triggered_by_id: Union[Unset, str] = UNSET - triggered_by_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - version: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - archived = self.archived - - contents = self.contents - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_id = self.install_id - - triggered_by_id = self.triggered_by_id - - triggered_by_type = self.triggered_by_type - - updated_at = self.updated_at - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if archived is not UNSET: - field_dict["archived"] = archived - if contents is not UNSET: - field_dict["contents"] = contents - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_id is not UNSET: - field_dict["install_id"] = install_id - if triggered_by_id is not UNSET: - field_dict["triggered_by_id"] = triggered_by_id - if triggered_by_type is not UNSET: - field_dict["triggered_by_type"] = triggered_by_type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - archived = d.pop("archived", UNSET) - - contents = d.pop("contents", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_id = d.pop("install_id", UNSET) - - triggered_by_id = d.pop("triggered_by_id", UNSET) - - triggered_by_type = d.pop("triggered_by_type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - version = d.pop("version", UNSET) - - app_install_state = cls( - archived=archived, - contents=contents, - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_id=install_id, - triggered_by_id=triggered_by_id, - triggered_by_type=triggered_by_type, - updated_at=updated_at, - version=version, - ) - - app_install_state.additional_properties = d - return app_install_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_installer.py b/nuon/models/app_installer.py deleted file mode 100644 index fa309ba5..00000000 --- a/nuon/models/app_installer.py +++ /dev/null @@ -1,155 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_installer_type import AppInstallerType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app import AppApp - from ..models.app_installer_metadata import AppInstallerMetadata - - -T = TypeVar("T", bound="AppInstaller") - - -@_attrs_define -class AppInstaller: - """ - Attributes: - apps (Union[Unset, list['AppApp']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - metadata (Union[Unset, AppInstallerMetadata]): - org_id (Union[Unset, str]): - type_ (Union[Unset, AppInstallerType]): - updated_at (Union[Unset, str]): - """ - - apps: Union[Unset, list["AppApp"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - metadata: Union[Unset, "AppInstallerMetadata"] = UNSET - org_id: Union[Unset, str] = UNSET - type_: Union[Unset, AppInstallerType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - apps: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.apps, Unset): - apps = [] - for apps_item_data in self.apps: - apps_item = apps_item_data.to_dict() - apps.append(apps_item) - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - org_id = self.org_id - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if apps is not UNSET: - field_dict["apps"] = apps - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if metadata is not UNSET: - field_dict["metadata"] = metadata - if org_id is not UNSET: - field_dict["org_id"] = org_id - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app import AppApp - from ..models.app_installer_metadata import AppInstallerMetadata - - d = dict(src_dict) - apps = [] - _apps = d.pop("apps", UNSET) - for apps_item_data in _apps or []: - apps_item = AppApp.from_dict(apps_item_data) - - apps.append(apps_item) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppInstallerMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppInstallerMetadata.from_dict(_metadata) - - org_id = d.pop("org_id", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppInstallerType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppInstallerType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_installer = cls( - apps=apps, - created_at=created_at, - created_by_id=created_by_id, - id=id, - metadata=metadata, - org_id=org_id, - type_=type_, - updated_at=updated_at, - ) - - app_installer.additional_properties = d - return app_installer - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_installer_metadata.py b/nuon/models/app_installer_metadata.py deleted file mode 100644 index 3d62b45e..00000000 --- a/nuon/models/app_installer_metadata.py +++ /dev/null @@ -1,221 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppInstallerMetadata") - - -@_attrs_define -class AppInstallerMetadata: - """ - Attributes: - community_url (Union[Unset, str]): - copyright_markdown (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - demo_url (Union[Unset, str]): - description (Union[Unset, str]): - documentation_url (Union[Unset, str]): - favicon_url (Union[Unset, str]): - footer_markdown (Union[Unset, str]): - formatted_demo_url (Union[Unset, str]): - github_url (Union[Unset, str]): - homepage_url (Union[Unset, str]): - id (Union[Unset, str]): - installer_id (Union[Unset, str]): - logo_url (Union[Unset, str]): - name (Union[Unset, str]): - og_image_url (Union[Unset, str]): - post_install_markdown (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - community_url: Union[Unset, str] = UNSET - copyright_markdown: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - demo_url: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - documentation_url: Union[Unset, str] = UNSET - favicon_url: Union[Unset, str] = UNSET - footer_markdown: Union[Unset, str] = UNSET - formatted_demo_url: Union[Unset, str] = UNSET - github_url: Union[Unset, str] = UNSET - homepage_url: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - installer_id: Union[Unset, str] = UNSET - logo_url: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - og_image_url: Union[Unset, str] = UNSET - post_install_markdown: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - community_url = self.community_url - - copyright_markdown = self.copyright_markdown - - created_at = self.created_at - - created_by_id = self.created_by_id - - demo_url = self.demo_url - - description = self.description - - documentation_url = self.documentation_url - - favicon_url = self.favicon_url - - footer_markdown = self.footer_markdown - - formatted_demo_url = self.formatted_demo_url - - github_url = self.github_url - - homepage_url = self.homepage_url - - id = self.id - - installer_id = self.installer_id - - logo_url = self.logo_url - - name = self.name - - og_image_url = self.og_image_url - - post_install_markdown = self.post_install_markdown - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if community_url is not UNSET: - field_dict["community_url"] = community_url - if copyright_markdown is not UNSET: - field_dict["copyright_markdown"] = copyright_markdown - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if demo_url is not UNSET: - field_dict["demo_url"] = demo_url - if description is not UNSET: - field_dict["description"] = description - if documentation_url is not UNSET: - field_dict["documentation_url"] = documentation_url - if favicon_url is not UNSET: - field_dict["favicon_url"] = favicon_url - if footer_markdown is not UNSET: - field_dict["footer_markdown"] = footer_markdown - if formatted_demo_url is not UNSET: - field_dict["formatted_demo_url"] = formatted_demo_url - if github_url is not UNSET: - field_dict["github_url"] = github_url - if homepage_url is not UNSET: - field_dict["homepage_url"] = homepage_url - if id is not UNSET: - field_dict["id"] = id - if installer_id is not UNSET: - field_dict["installer_id"] = installer_id - if logo_url is not UNSET: - field_dict["logo_url"] = logo_url - if name is not UNSET: - field_dict["name"] = name - if og_image_url is not UNSET: - field_dict["og_image_url"] = og_image_url - if post_install_markdown is not UNSET: - field_dict["post_install_markdown"] = post_install_markdown - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - community_url = d.pop("community_url", UNSET) - - copyright_markdown = d.pop("copyright_markdown", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - demo_url = d.pop("demo_url", UNSET) - - description = d.pop("description", UNSET) - - documentation_url = d.pop("documentation_url", UNSET) - - favicon_url = d.pop("favicon_url", UNSET) - - footer_markdown = d.pop("footer_markdown", UNSET) - - formatted_demo_url = d.pop("formatted_demo_url", UNSET) - - github_url = d.pop("github_url", UNSET) - - homepage_url = d.pop("homepage_url", UNSET) - - id = d.pop("id", UNSET) - - installer_id = d.pop("installer_id", UNSET) - - logo_url = d.pop("logo_url", UNSET) - - name = d.pop("name", UNSET) - - og_image_url = d.pop("og_image_url", UNSET) - - post_install_markdown = d.pop("post_install_markdown", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_installer_metadata = cls( - community_url=community_url, - copyright_markdown=copyright_markdown, - created_at=created_at, - created_by_id=created_by_id, - demo_url=demo_url, - description=description, - documentation_url=documentation_url, - favicon_url=favicon_url, - footer_markdown=footer_markdown, - formatted_demo_url=formatted_demo_url, - github_url=github_url, - homepage_url=homepage_url, - id=id, - installer_id=installer_id, - logo_url=logo_url, - name=name, - og_image_url=og_image_url, - post_install_markdown=post_install_markdown, - updated_at=updated_at, - ) - - app_installer_metadata.additional_properties = d - return app_installer_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/nuon/models/app_installer_type.py b/nuon/models/app_installer_type.py deleted file mode 100644 index e2c76e61..00000000 --- a/nuon/models/app_installer_type.py +++ /dev/null @@ -1,8 +0,0 @@ -from enum import Enum - - -class AppInstallerType(str, Enum): - SELF_HOSTED = "self_hosted" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_job_component_config.py b/nuon/models/app_job_component_config.py deleted file mode 100644 index f3072908..00000000 --- a/nuon/models/app_job_component_config.py +++ /dev/null @@ -1,157 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_job_component_config_env_vars import AppJobComponentConfigEnvVars - - -T = TypeVar("T", bound="AppJobComponentConfig") - - -@_attrs_define -class AppJobComponentConfig: - """ - Attributes: - args (Union[Unset, list[str]]): - cmd (Union[Unset, list[str]]): - component_config_connection_id (Union[Unset, str]): value - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppJobComponentConfigEnvVars]): - id (Union[Unset, str]): - image_url (Union[Unset, str]): Image attributes, copied from a docker_buid or external_image component. - tag (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - args: Union[Unset, list[str]] = UNSET - cmd: Union[Unset, list[str]] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppJobComponentConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - image_url: Union[Unset, str] = UNSET - tag: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args: Union[Unset, list[str]] = UNSET - if not isinstance(self.args, Unset): - args = self.args - - cmd: Union[Unset, list[str]] = UNSET - if not isinstance(self.cmd, Unset): - cmd = self.cmd - - component_config_connection_id = self.component_config_connection_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - id = self.id - - image_url = self.image_url - - tag = self.tag - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if args is not UNSET: - field_dict["args"] = args - if cmd is not UNSET: - field_dict["cmd"] = cmd - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if id is not UNSET: - field_dict["id"] = id - if image_url is not UNSET: - field_dict["image_url"] = image_url - if tag is not UNSET: - field_dict["tag"] = tag - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_job_component_config_env_vars import AppJobComponentConfigEnvVars - - d = dict(src_dict) - args = cast(list[str], d.pop("args", UNSET)) - - cmd = cast(list[str], d.pop("cmd", UNSET)) - - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppJobComponentConfigEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = AppJobComponentConfigEnvVars.from_dict(_env_vars) - - id = d.pop("id", UNSET) - - image_url = d.pop("image_url", UNSET) - - tag = d.pop("tag", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_job_component_config = cls( - args=args, - cmd=cmd, - component_config_connection_id=component_config_connection_id, - created_at=created_at, - created_by_id=created_by_id, - env_vars=env_vars, - id=id, - image_url=image_url, - tag=tag, - updated_at=updated_at, - ) - - app_job_component_config.additional_properties = d - return app_job_component_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_job_component_config_env_vars.py b/nuon/models/app_job_component_config_env_vars.py deleted file mode 100644 index d9e22238..00000000 --- a/nuon/models/app_job_component_config_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppJobComponentConfigEnvVars") - - -@_attrs_define -class AppJobComponentConfigEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_job_component_config_env_vars = cls() - - app_job_component_config_env_vars.additional_properties = d - return app_job_component_config_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_json_map.py b/nuon/models/app_json_map.py deleted file mode 100644 index 7a5e56ba..00000000 --- a/nuon/models/app_json_map.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppJSONMap") - - -@_attrs_define -class AppJSONMap: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_json_map = cls() - - app_json_map.additional_properties = d - return app_json_map - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_kubernetes_manifest_component_config.py b/nuon/models/app_kubernetes_manifest_component_config.py deleted file mode 100644 index c3f334eb..00000000 --- a/nuon/models/app_kubernetes_manifest_component_config.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppKubernetesManifestComponentConfig") - - -@_attrs_define -class AppKubernetesManifestComponentConfig: - """ - Attributes: - component_config_connection_id (Union[Unset, str]): value - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - manifest (Union[Unset, str]): - namespace (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - component_config_connection_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - manifest: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - component_config_connection_id = self.component_config_connection_id - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - manifest = self.manifest - - namespace = self.namespace - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if manifest is not UNSET: - field_dict["manifest"] = manifest - if namespace is not UNSET: - field_dict["namespace"] = namespace - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - manifest = d.pop("manifest", UNSET) - - namespace = d.pop("namespace", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_kubernetes_manifest_component_config = cls( - component_config_connection_id=component_config_connection_id, - created_at=created_at, - created_by_id=created_by_id, - id=id, - manifest=manifest, - namespace=namespace, - updated_at=updated_at, - ) - - app_kubernetes_manifest_component_config.additional_properties = d - return app_kubernetes_manifest_component_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_log_stream.py b/nuon/models/app_log_stream.py deleted file mode 100644 index 91252074..00000000 --- a/nuon/models/app_log_stream.py +++ /dev/null @@ -1,162 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_log_stream_attrs import AppLogStreamAttrs - - -T = TypeVar("T", bound="AppLogStream") - - -@_attrs_define -class AppLogStream: - """ - Attributes: - attrs (Union[Unset, AppLogStreamAttrs]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - open_ (Union[Unset, bool]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - runner_api_url (Union[Unset, str]): - updated_at (Union[Unset, str]): - write_token (Union[Unset, str]): - """ - - attrs: Union[Unset, "AppLogStreamAttrs"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - open_: Union[Unset, bool] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - runner_api_url: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - write_token: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - attrs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.attrs, Unset): - attrs = self.attrs.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - open_ = self.open_ - - org_id = self.org_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - runner_api_url = self.runner_api_url - - updated_at = self.updated_at - - write_token = self.write_token - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if attrs is not UNSET: - field_dict["attrs"] = attrs - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if open_ is not UNSET: - field_dict["open"] = open_ - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if runner_api_url is not UNSET: - field_dict["runner_api_url"] = runner_api_url - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if write_token is not UNSET: - field_dict["write_token"] = write_token - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_log_stream_attrs import AppLogStreamAttrs - - d = dict(src_dict) - _attrs = d.pop("attrs", UNSET) - attrs: Union[Unset, AppLogStreamAttrs] - if isinstance(_attrs, Unset): - attrs = UNSET - else: - attrs = AppLogStreamAttrs.from_dict(_attrs) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - open_ = d.pop("open", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - runner_api_url = d.pop("runner_api_url", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - write_token = d.pop("write_token", UNSET) - - app_log_stream = cls( - attrs=attrs, - created_at=created_at, - created_by_id=created_by_id, - id=id, - open_=open_, - org_id=org_id, - owner_id=owner_id, - owner_type=owner_type, - runner_api_url=runner_api_url, - updated_at=updated_at, - write_token=write_token, - ) - - app_log_stream.additional_properties = d - return app_log_stream - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_log_stream_attrs.py b/nuon/models/app_log_stream_attrs.py deleted file mode 100644 index 01b8718e..00000000 --- a/nuon/models/app_log_stream_attrs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppLogStreamAttrs") - - -@_attrs_define -class AppLogStreamAttrs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_log_stream_attrs = cls() - - app_log_stream_attrs.additional_properties = d - return app_log_stream_attrs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_notifications_config.py b/nuon/models/app_notifications_config.py deleted file mode 100644 index 7826cfc4..00000000 --- a/nuon/models/app_notifications_config.py +++ /dev/null @@ -1,122 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppNotificationsConfig") - - -@_attrs_define -class AppNotificationsConfig: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - slack_webhook_url (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - slack_webhook_url: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - slack_webhook_url = self.slack_webhook_url - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if slack_webhook_url is not UNSET: - field_dict["slack_webhook_url"] = slack_webhook_url - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - slack_webhook_url = d.pop("slack_webhook_url", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_notifications_config = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - owner_id=owner_id, - owner_type=owner_type, - slack_webhook_url=slack_webhook_url, - updated_at=updated_at, - ) - - app_notifications_config.additional_properties = d - return app_notifications_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_oci_artifact.py b/nuon/models/app_oci_artifact.py deleted file mode 100644 index b1e95392..00000000 --- a/nuon/models/app_oci_artifact.py +++ /dev/null @@ -1,247 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_oci_artifact_annotations import AppOCIArtifactAnnotations - - -T = TypeVar("T", bound="AppOCIArtifact") - - -@_attrs_define -class AppOCIArtifact: - """ - Attributes: - annotations (Union[Unset, AppOCIArtifactAnnotations]): - architecture (Union[Unset, str]): - artifact_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - digest (Union[Unset, str]): - id (Union[Unset, str]): - media_type (Union[Unset, str]): - org_id (Union[Unset, str]): - os (Union[Unset, str]): Platform fields - os_features (Union[Unset, list[str]]): - os_version (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - repository (Union[Unset, str]): - size (Union[Unset, int]): - tag (Union[Unset, str]): - updated_at (Union[Unset, str]): - urls (Union[Unset, list[str]]): - variant (Union[Unset, str]): - """ - - annotations: Union[Unset, "AppOCIArtifactAnnotations"] = UNSET - architecture: Union[Unset, str] = UNSET - artifact_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - digest: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - media_type: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - os: Union[Unset, str] = UNSET - os_features: Union[Unset, list[str]] = UNSET - os_version: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - repository: Union[Unset, str] = UNSET - size: Union[Unset, int] = UNSET - tag: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - urls: Union[Unset, list[str]] = UNSET - variant: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - annotations: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.annotations, Unset): - annotations = self.annotations.to_dict() - - architecture = self.architecture - - artifact_type = self.artifact_type - - created_at = self.created_at - - created_by_id = self.created_by_id - - digest = self.digest - - id = self.id - - media_type = self.media_type - - org_id = self.org_id - - os = self.os - - os_features: Union[Unset, list[str]] = UNSET - if not isinstance(self.os_features, Unset): - os_features = self.os_features - - os_version = self.os_version - - owner_id = self.owner_id - - owner_type = self.owner_type - - repository = self.repository - - size = self.size - - tag = self.tag - - updated_at = self.updated_at - - urls: Union[Unset, list[str]] = UNSET - if not isinstance(self.urls, Unset): - urls = self.urls - - variant = self.variant - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if annotations is not UNSET: - field_dict["annotations"] = annotations - if architecture is not UNSET: - field_dict["architecture"] = architecture - if artifact_type is not UNSET: - field_dict["artifact_type"] = artifact_type - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if digest is not UNSET: - field_dict["digest"] = digest - if id is not UNSET: - field_dict["id"] = id - if media_type is not UNSET: - field_dict["media_type"] = media_type - if org_id is not UNSET: - field_dict["org_id"] = org_id - if os is not UNSET: - field_dict["os"] = os - if os_features is not UNSET: - field_dict["os_features"] = os_features - if os_version is not UNSET: - field_dict["os_version"] = os_version - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if repository is not UNSET: - field_dict["repository"] = repository - if size is not UNSET: - field_dict["size"] = size - if tag is not UNSET: - field_dict["tag"] = tag - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if urls is not UNSET: - field_dict["urls"] = urls - if variant is not UNSET: - field_dict["variant"] = variant - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_oci_artifact_annotations import AppOCIArtifactAnnotations - - d = dict(src_dict) - _annotations = d.pop("annotations", UNSET) - annotations: Union[Unset, AppOCIArtifactAnnotations] - if isinstance(_annotations, Unset): - annotations = UNSET - else: - annotations = AppOCIArtifactAnnotations.from_dict(_annotations) - - architecture = d.pop("architecture", UNSET) - - artifact_type = d.pop("artifact_type", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - digest = d.pop("digest", UNSET) - - id = d.pop("id", UNSET) - - media_type = d.pop("media_type", UNSET) - - org_id = d.pop("org_id", UNSET) - - os = d.pop("os", UNSET) - - os_features = cast(list[str], d.pop("os_features", UNSET)) - - os_version = d.pop("os_version", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - repository = d.pop("repository", UNSET) - - size = d.pop("size", UNSET) - - tag = d.pop("tag", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - urls = cast(list[str], d.pop("urls", UNSET)) - - variant = d.pop("variant", UNSET) - - app_oci_artifact = cls( - annotations=annotations, - architecture=architecture, - artifact_type=artifact_type, - created_at=created_at, - created_by_id=created_by_id, - digest=digest, - id=id, - media_type=media_type, - org_id=org_id, - os=os, - os_features=os_features, - os_version=os_version, - owner_id=owner_id, - owner_type=owner_type, - repository=repository, - size=size, - tag=tag, - updated_at=updated_at, - urls=urls, - variant=variant, - ) - - app_oci_artifact.additional_properties = d - return app_oci_artifact - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_oci_artifact_annotations.py b/nuon/models/app_oci_artifact_annotations.py deleted file mode 100644 index 5cb6ae6d..00000000 --- a/nuon/models/app_oci_artifact_annotations.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppOCIArtifactAnnotations") - - -@_attrs_define -class AppOCIArtifactAnnotations: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_oci_artifact_annotations = cls() - - app_oci_artifact_annotations.additional_properties = d - return app_oci_artifact_annotations - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_operation_status.py b/nuon/models/app_operation_status.py deleted file mode 100644 index a04def93..00000000 --- a/nuon/models/app_operation_status.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class AppOperationStatus(str, Enum): - FAILED = "failed" - FINISHED = "finished" - NOOP = "noop" - STARTED = "started" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_org.py b/nuon/models/app_org.py deleted file mode 100644 index 833cbce6..00000000 --- a/nuon/models/app_org.py +++ /dev/null @@ -1,228 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_notifications_config import AppNotificationsConfig - from ..models.app_org_links import AppOrgLinks - from ..models.app_runner_group import AppRunnerGroup - from ..models.app_vcs_connection import AppVCSConnection - from ..models.types_string_bool_map import TypesStringBoolMap - - -T = TypeVar("T", bound="AppOrg") - - -@_attrs_define -class AppOrg: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - features (Union[Unset, TypesStringBoolMap]): - id (Union[Unset, str]): - links (Union[Unset, AppOrgLinks]): - logo_url (Union[Unset, str]): - name (Union[Unset, str]): - notifications_config (Union[Unset, AppNotificationsConfig]): - runner_group (Union[Unset, AppRunnerGroup]): - sandbox_mode (Union[Unset, bool]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connections (Union[Unset, list['AppVCSConnection']]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - features: Union[Unset, "TypesStringBoolMap"] = UNSET - id: Union[Unset, str] = UNSET - links: Union[Unset, "AppOrgLinks"] = UNSET - logo_url: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - notifications_config: Union[Unset, "AppNotificationsConfig"] = UNSET - runner_group: Union[Unset, "AppRunnerGroup"] = UNSET - sandbox_mode: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connections: Union[Unset, list["AppVCSConnection"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - features: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.features, Unset): - features = self.features.to_dict() - - id = self.id - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - logo_url = self.logo_url - - name = self.name - - notifications_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.notifications_config, Unset): - notifications_config = self.notifications_config.to_dict() - - runner_group: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_group, Unset): - runner_group = self.runner_group.to_dict() - - sandbox_mode = self.sandbox_mode - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - vcs_connections: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.vcs_connections, Unset): - vcs_connections = [] - for vcs_connections_item_data in self.vcs_connections: - vcs_connections_item = vcs_connections_item_data.to_dict() - vcs_connections.append(vcs_connections_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if features is not UNSET: - field_dict["features"] = features - if id is not UNSET: - field_dict["id"] = id - if links is not UNSET: - field_dict["links"] = links - if logo_url is not UNSET: - field_dict["logo_url"] = logo_url - if name is not UNSET: - field_dict["name"] = name - if notifications_config is not UNSET: - field_dict["notifications_config"] = notifications_config - if runner_group is not UNSET: - field_dict["runner_group"] = runner_group - if sandbox_mode is not UNSET: - field_dict["sandbox_mode"] = sandbox_mode - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vcs_connections is not UNSET: - field_dict["vcs_connections"] = vcs_connections - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_notifications_config import AppNotificationsConfig - from ..models.app_org_links import AppOrgLinks - from ..models.app_runner_group import AppRunnerGroup - from ..models.app_vcs_connection import AppVCSConnection - from ..models.types_string_bool_map import TypesStringBoolMap - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _features = d.pop("features", UNSET) - features: Union[Unset, TypesStringBoolMap] - if isinstance(_features, Unset): - features = UNSET - else: - features = TypesStringBoolMap.from_dict(_features) - - id = d.pop("id", UNSET) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppOrgLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppOrgLinks.from_dict(_links) - - logo_url = d.pop("logo_url", UNSET) - - name = d.pop("name", UNSET) - - _notifications_config = d.pop("notifications_config", UNSET) - notifications_config: Union[Unset, AppNotificationsConfig] - if isinstance(_notifications_config, Unset): - notifications_config = UNSET - else: - notifications_config = AppNotificationsConfig.from_dict(_notifications_config) - - _runner_group = d.pop("runner_group", UNSET) - runner_group: Union[Unset, AppRunnerGroup] - if isinstance(_runner_group, Unset): - runner_group = UNSET - else: - runner_group = AppRunnerGroup.from_dict(_runner_group) - - sandbox_mode = d.pop("sandbox_mode", UNSET) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - vcs_connections = [] - _vcs_connections = d.pop("vcs_connections", UNSET) - for vcs_connections_item_data in _vcs_connections or []: - vcs_connections_item = AppVCSConnection.from_dict(vcs_connections_item_data) - - vcs_connections.append(vcs_connections_item) - - app_org = cls( - created_at=created_at, - created_by_id=created_by_id, - features=features, - id=id, - links=links, - logo_url=logo_url, - name=name, - notifications_config=notifications_config, - runner_group=runner_group, - sandbox_mode=sandbox_mode, - status=status, - status_description=status_description, - updated_at=updated_at, - vcs_connections=vcs_connections, - ) - - app_org.additional_properties = d - return app_org - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_org_invite.py b/nuon/models/app_org_invite.py deleted file mode 100644 index 00cb876e..00000000 --- a/nuon/models/app_org_invite.py +++ /dev/null @@ -1,138 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_org_invite_status import AppOrgInviteStatus -from ..models.app_role_type import AppRoleType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppOrgInvite") - - -@_attrs_define -class AppOrgInvite: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - email (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): parent relationship - role_type (Union[Unset, AppRoleType]): - status (Union[Unset, AppOrgInviteStatus]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - role_type: Union[Unset, AppRoleType] = UNSET - status: Union[Unset, AppOrgInviteStatus] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - email = self.email - - id = self.id - - org_id = self.org_id - - role_type: Union[Unset, str] = UNSET - if not isinstance(self.role_type, Unset): - role_type = self.role_type.value - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if email is not UNSET: - field_dict["email"] = email - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if role_type is not UNSET: - field_dict["role_type"] = role_type - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - email = d.pop("email", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - _role_type = d.pop("role_type", UNSET) - role_type: Union[Unset, AppRoleType] - if isinstance(_role_type, Unset): - role_type = UNSET - else: - role_type = AppRoleType(_role_type) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppOrgInviteStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppOrgInviteStatus(_status) - - updated_at = d.pop("updated_at", UNSET) - - app_org_invite = cls( - created_at=created_at, - created_by_id=created_by_id, - email=email, - id=id, - org_id=org_id, - role_type=role_type, - status=status, - updated_at=updated_at, - ) - - app_org_invite.additional_properties = d - return app_org_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/nuon/models/app_org_invite_status.py b/nuon/models/app_org_invite_status.py deleted file mode 100644 index d5f8de3d..00000000 --- a/nuon/models/app_org_invite_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class AppOrgInviteStatus(str, Enum): - ACCEPTED = "accepted" - PENDING = "pending" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_org_links.py b/nuon/models/app_org_links.py deleted file mode 100644 index b8c3ddea..00000000 --- a/nuon/models/app_org_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppOrgLinks") - - -@_attrs_define -class AppOrgLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_org_links = cls() - - app_org_links.additional_properties = d - return app_org_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record.py b/nuon/models/app_otel_log_record.py deleted file mode 100644 index 12f6ccdf..00000000 --- a/nuon/models/app_otel_log_record.py +++ /dev/null @@ -1,333 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_otel_log_record_log_attributes import AppOtelLogRecordLogAttributes - from ..models.app_otel_log_record_resource_attributes import AppOtelLogRecordResourceAttributes - from ..models.app_otel_log_record_scope_attributes import AppOtelLogRecordScopeAttributes - - -T = TypeVar("T", bound="AppOtelLogRecord") - - -@_attrs_define -class AppOtelLogRecord: - """ - Attributes: - body (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - log_attributes (Union[Unset, AppOtelLogRecordLogAttributes]): - log_stream_id (Union[Unset, str]): - org_id (Union[Unset, str]): internal attributes - resource_attributes (Union[Unset, AppOtelLogRecordResourceAttributes]): - resource_schema_url (Union[Unset, str]): - runner_group_id (Union[Unset, str]): - runner_id (Union[Unset, str]): - runner_job_execution_id (Union[Unset, str]): - runner_job_execution_step (Union[Unset, str]): - runner_job_id (Union[Unset, str]): - scope_attributes (Union[Unset, AppOtelLogRecordScopeAttributes]): - scope_name (Union[Unset, str]): - scope_schema_url (Union[Unset, str]): - scope_version (Union[Unset, str]): - service_name (Union[Unset, str]): - severity_number (Union[Unset, int]): - severity_text (Union[Unset, str]): - span_id (Union[Unset, str]): - timestamp (Union[Unset, str]): OTEL log message attributes - timestamp_date (Union[Unset, str]): - timestamp_time (Union[Unset, str]): - trace_flags (Union[Unset, int]): - trace_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - body: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - log_attributes: Union[Unset, "AppOtelLogRecordLogAttributes"] = UNSET - log_stream_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - resource_attributes: Union[Unset, "AppOtelLogRecordResourceAttributes"] = UNSET - resource_schema_url: Union[Unset, str] = UNSET - runner_group_id: Union[Unset, str] = UNSET - runner_id: Union[Unset, str] = UNSET - runner_job_execution_id: Union[Unset, str] = UNSET - runner_job_execution_step: Union[Unset, str] = UNSET - runner_job_id: Union[Unset, str] = UNSET - scope_attributes: Union[Unset, "AppOtelLogRecordScopeAttributes"] = UNSET - scope_name: Union[Unset, str] = UNSET - scope_schema_url: Union[Unset, str] = UNSET - scope_version: Union[Unset, str] = UNSET - service_name: Union[Unset, str] = UNSET - severity_number: Union[Unset, int] = UNSET - severity_text: Union[Unset, str] = UNSET - span_id: Union[Unset, str] = UNSET - timestamp: Union[Unset, str] = UNSET - timestamp_date: Union[Unset, str] = UNSET - timestamp_time: Union[Unset, str] = UNSET - trace_flags: Union[Unset, int] = UNSET - trace_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - body = self.body - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - log_attributes: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.log_attributes, Unset): - log_attributes = self.log_attributes.to_dict() - - log_stream_id = self.log_stream_id - - org_id = self.org_id - - resource_attributes: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.resource_attributes, Unset): - resource_attributes = self.resource_attributes.to_dict() - - resource_schema_url = self.resource_schema_url - - runner_group_id = self.runner_group_id - - runner_id = self.runner_id - - runner_job_execution_id = self.runner_job_execution_id - - runner_job_execution_step = self.runner_job_execution_step - - runner_job_id = self.runner_job_id - - scope_attributes: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.scope_attributes, Unset): - scope_attributes = self.scope_attributes.to_dict() - - scope_name = self.scope_name - - scope_schema_url = self.scope_schema_url - - scope_version = self.scope_version - - service_name = self.service_name - - severity_number = self.severity_number - - severity_text = self.severity_text - - span_id = self.span_id - - timestamp = self.timestamp - - timestamp_date = self.timestamp_date - - timestamp_time = self.timestamp_time - - trace_flags = self.trace_flags - - trace_id = self.trace_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if body is not UNSET: - field_dict["body"] = body - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if log_attributes is not UNSET: - field_dict["log_attributes"] = log_attributes - if log_stream_id is not UNSET: - field_dict["log_stream_id"] = log_stream_id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if resource_attributes is not UNSET: - field_dict["resource_attributes"] = resource_attributes - if resource_schema_url is not UNSET: - field_dict["resource_schema_url"] = resource_schema_url - if runner_group_id is not UNSET: - field_dict["runner_group_id"] = runner_group_id - if runner_id is not UNSET: - field_dict["runner_id"] = runner_id - if runner_job_execution_id is not UNSET: - field_dict["runner_job_execution_id"] = runner_job_execution_id - if runner_job_execution_step is not UNSET: - field_dict["runner_job_execution_step"] = runner_job_execution_step - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if scope_attributes is not UNSET: - field_dict["scope_attributes"] = scope_attributes - if scope_name is not UNSET: - field_dict["scope_name"] = scope_name - if scope_schema_url is not UNSET: - field_dict["scope_schema_url"] = scope_schema_url - if scope_version is not UNSET: - field_dict["scope_version"] = scope_version - if service_name is not UNSET: - field_dict["service_name"] = service_name - if severity_number is not UNSET: - field_dict["severity_number"] = severity_number - if severity_text is not UNSET: - field_dict["severity_text"] = severity_text - if span_id is not UNSET: - field_dict["span_id"] = span_id - if timestamp is not UNSET: - field_dict["timestamp"] = timestamp - if timestamp_date is not UNSET: - field_dict["timestamp_date"] = timestamp_date - if timestamp_time is not UNSET: - field_dict["timestamp_time"] = timestamp_time - if trace_flags is not UNSET: - field_dict["trace_flags"] = trace_flags - if trace_id is not UNSET: - field_dict["trace_id"] = trace_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_otel_log_record_log_attributes import AppOtelLogRecordLogAttributes - from ..models.app_otel_log_record_resource_attributes import AppOtelLogRecordResourceAttributes - from ..models.app_otel_log_record_scope_attributes import AppOtelLogRecordScopeAttributes - - d = dict(src_dict) - body = d.pop("body", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _log_attributes = d.pop("log_attributes", UNSET) - log_attributes: Union[Unset, AppOtelLogRecordLogAttributes] - if isinstance(_log_attributes, Unset): - log_attributes = UNSET - else: - log_attributes = AppOtelLogRecordLogAttributes.from_dict(_log_attributes) - - log_stream_id = d.pop("log_stream_id", UNSET) - - org_id = d.pop("org_id", UNSET) - - _resource_attributes = d.pop("resource_attributes", UNSET) - resource_attributes: Union[Unset, AppOtelLogRecordResourceAttributes] - if isinstance(_resource_attributes, Unset): - resource_attributes = UNSET - else: - resource_attributes = AppOtelLogRecordResourceAttributes.from_dict(_resource_attributes) - - resource_schema_url = d.pop("resource_schema_url", UNSET) - - runner_group_id = d.pop("runner_group_id", UNSET) - - runner_id = d.pop("runner_id", UNSET) - - runner_job_execution_id = d.pop("runner_job_execution_id", UNSET) - - runner_job_execution_step = d.pop("runner_job_execution_step", UNSET) - - runner_job_id = d.pop("runner_job_id", UNSET) - - _scope_attributes = d.pop("scope_attributes", UNSET) - scope_attributes: Union[Unset, AppOtelLogRecordScopeAttributes] - if isinstance(_scope_attributes, Unset): - scope_attributes = UNSET - else: - scope_attributes = AppOtelLogRecordScopeAttributes.from_dict(_scope_attributes) - - scope_name = d.pop("scope_name", UNSET) - - scope_schema_url = d.pop("scope_schema_url", UNSET) - - scope_version = d.pop("scope_version", UNSET) - - service_name = d.pop("service_name", UNSET) - - severity_number = d.pop("severity_number", UNSET) - - severity_text = d.pop("severity_text", UNSET) - - span_id = d.pop("span_id", UNSET) - - timestamp = d.pop("timestamp", UNSET) - - timestamp_date = d.pop("timestamp_date", UNSET) - - timestamp_time = d.pop("timestamp_time", UNSET) - - trace_flags = d.pop("trace_flags", UNSET) - - trace_id = d.pop("trace_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_otel_log_record = cls( - body=body, - created_at=created_at, - created_by_id=created_by_id, - id=id, - log_attributes=log_attributes, - log_stream_id=log_stream_id, - org_id=org_id, - resource_attributes=resource_attributes, - resource_schema_url=resource_schema_url, - runner_group_id=runner_group_id, - runner_id=runner_id, - runner_job_execution_id=runner_job_execution_id, - runner_job_execution_step=runner_job_execution_step, - runner_job_id=runner_job_id, - scope_attributes=scope_attributes, - scope_name=scope_name, - scope_schema_url=scope_schema_url, - scope_version=scope_version, - service_name=service_name, - severity_number=severity_number, - severity_text=severity_text, - span_id=span_id, - timestamp=timestamp, - timestamp_date=timestamp_date, - timestamp_time=timestamp_time, - trace_flags=trace_flags, - trace_id=trace_id, - updated_at=updated_at, - ) - - app_otel_log_record.additional_properties = d - return app_otel_log_record - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record_log_attributes.py b/nuon/models/app_otel_log_record_log_attributes.py deleted file mode 100644 index a76118b5..00000000 --- a/nuon/models/app_otel_log_record_log_attributes.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppOtelLogRecordLogAttributes") - - -@_attrs_define -class AppOtelLogRecordLogAttributes: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_otel_log_record_log_attributes = cls() - - app_otel_log_record_log_attributes.additional_properties = d - return app_otel_log_record_log_attributes - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record_resource_attributes.py b/nuon/models/app_otel_log_record_resource_attributes.py deleted file mode 100644 index eb1a0d80..00000000 --- a/nuon/models/app_otel_log_record_resource_attributes.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppOtelLogRecordResourceAttributes") - - -@_attrs_define -class AppOtelLogRecordResourceAttributes: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_otel_log_record_resource_attributes = cls() - - app_otel_log_record_resource_attributes.additional_properties = d - return app_otel_log_record_resource_attributes - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record_scope_attributes.py b/nuon/models/app_otel_log_record_scope_attributes.py deleted file mode 100644 index 76262ec0..00000000 --- a/nuon/models/app_otel_log_record_scope_attributes.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppOtelLogRecordScopeAttributes") - - -@_attrs_define -class AppOtelLogRecordScopeAttributes: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_otel_log_record_scope_attributes = cls() - - app_otel_log_record_scope_attributes.additional_properties = d - return app_otel_log_record_scope_attributes - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_policy.py b/nuon/models/app_policy.py deleted file mode 100644 index d20c19ca..00000000 --- a/nuon/models/app_policy.py +++ /dev/null @@ -1,135 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_policy_name import AppPolicyName -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_policy_permissions import AppPolicyPermissions - - -T = TypeVar("T", bound="AppPolicy") - - -@_attrs_define -class AppPolicy: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, AppPolicyName]): - permissions (Union[Unset, AppPolicyPermissions]): Permissions are used to track granular permissions for each - domain - role_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, AppPolicyName] = UNSET - permissions: Union[Unset, "AppPolicyPermissions"] = UNSET - role_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - name: Union[Unset, str] = UNSET - if not isinstance(self.name, Unset): - name = self.name.value - - permissions: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.permissions, Unset): - permissions = self.permissions.to_dict() - - role_id = self.role_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if permissions is not UNSET: - field_dict["permissions"] = permissions - if role_id is not UNSET: - field_dict["role_id"] = role_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_policy_permissions import AppPolicyPermissions - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _name = d.pop("name", UNSET) - name: Union[Unset, AppPolicyName] - if isinstance(_name, Unset): - name = UNSET - else: - name = AppPolicyName(_name) - - _permissions = d.pop("permissions", UNSET) - permissions: Union[Unset, AppPolicyPermissions] - if isinstance(_permissions, Unset): - permissions = UNSET - else: - permissions = AppPolicyPermissions.from_dict(_permissions) - - role_id = d.pop("role_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_policy = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - name=name, - permissions=permissions, - role_id=role_id, - updated_at=updated_at, - ) - - app_policy.additional_properties = d - return app_policy - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_policy_name.py b/nuon/models/app_policy_name.py deleted file mode 100644 index bd8a5d58..00000000 --- a/nuon/models/app_policy_name.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class AppPolicyName(str, Enum): - HOSTED_INSTALLER = "hosted_installer" - INSTALLER = "installer" - ORG_ADMIN = "org_admin" - RUNNER = "runner" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_policy_permissions.py b/nuon/models/app_policy_permissions.py deleted file mode 100644 index b22dfa48..00000000 --- a/nuon/models/app_policy_permissions.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppPolicyPermissions") - - -@_attrs_define -class AppPolicyPermissions: - """Permissions are used to track granular permissions for each domain""" - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_policy_permissions = cls() - - app_policy_permissions.additional_properties = d - return app_policy_permissions - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_public_git_vcs_config.py b/nuon/models/app_public_git_vcs_config.py deleted file mode 100644 index 4b2c1e78..00000000 --- a/nuon/models/app_public_git_vcs_config.py +++ /dev/null @@ -1,131 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppPublicGitVCSConfig") - - -@_attrs_define -class AppPublicGitVCSConfig: - """ - Attributes: - branch (Union[Unset, str]): - component_config_id (Union[Unset, str]): - component_config_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - directory (Union[Unset, str]): - id (Union[Unset, str]): - repo (Union[Unset, str]): actual configuration - updated_at (Union[Unset, str]): - """ - - branch: Union[Unset, str] = UNSET - component_config_id: Union[Unset, str] = UNSET - component_config_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - directory: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - repo: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - component_config_id = self.component_config_id - - component_config_type = self.component_config_type - - created_at = self.created_at - - created_by_id = self.created_by_id - - directory = self.directory - - id = self.id - - repo = self.repo - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if branch is not UNSET: - field_dict["branch"] = branch - if component_config_id is not UNSET: - field_dict["component_config_id"] = component_config_id - if component_config_type is not UNSET: - field_dict["component_config_type"] = component_config_type - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if directory is not UNSET: - field_dict["directory"] = directory - if id is not UNSET: - field_dict["id"] = id - if repo is not UNSET: - field_dict["repo"] = repo - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch", UNSET) - - component_config_id = d.pop("component_config_id", UNSET) - - component_config_type = d.pop("component_config_type", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - directory = d.pop("directory", UNSET) - - id = d.pop("id", UNSET) - - repo = d.pop("repo", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_public_git_vcs_config = cls( - branch=branch, - component_config_id=component_config_id, - component_config_type=component_config_type, - created_at=created_at, - created_by_id=created_by_id, - directory=directory, - id=id, - repo=repo, - updated_at=updated_at, - ) - - app_public_git_vcs_config.additional_properties = d - return app_public_git_vcs_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_role.py b/nuon/models/app_role.py deleted file mode 100644 index f039d710..00000000 --- a/nuon/models/app_role.py +++ /dev/null @@ -1,146 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_role_type import AppRoleType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_policy import AppPolicy - - -T = TypeVar("T", bound="AppRole") - - -@_attrs_define -class AppRole: - """ - Attributes: - created_by (Union[Unset, AppAccount]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - policies (Union[Unset, list['AppPolicy']]): - role_type (Union[Unset, AppRoleType]): - updated_at (Union[Unset, str]): - """ - - created_by: Union[Unset, "AppAccount"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - policies: Union[Unset, list["AppPolicy"]] = UNSET - role_type: Union[Unset, AppRoleType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - policies: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.policies, Unset): - policies = [] - for policies_item_data in self.policies: - policies_item = policies_item_data.to_dict() - policies.append(policies_item) - - role_type: Union[Unset, str] = UNSET - if not isinstance(self.role_type, Unset): - role_type = self.role_type.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_by is not UNSET: - field_dict["createdBy"] = created_by - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if policies is not UNSET: - field_dict["policies"] = policies - if role_type is not UNSET: - field_dict["role_type"] = role_type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_policy import AppPolicy - - d = dict(src_dict) - _created_by = d.pop("createdBy", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - policies = [] - _policies = d.pop("policies", UNSET) - for policies_item_data in _policies or []: - policies_item = AppPolicy.from_dict(policies_item_data) - - policies.append(policies_item) - - _role_type = d.pop("role_type", UNSET) - role_type: Union[Unset, AppRoleType] - if isinstance(_role_type, Unset): - role_type = UNSET - else: - role_type = AppRoleType(_role_type) - - updated_at = d.pop("updated_at", UNSET) - - app_role = cls( - created_by=created_by, - created_at=created_at, - created_by_id=created_by_id, - id=id, - policies=policies, - role_type=role_type, - updated_at=updated_at, - ) - - app_role.additional_properties = d - return app_role - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_role_type.py b/nuon/models/app_role_type.py deleted file mode 100644 index bca4537b..00000000 --- a/nuon/models/app_role_type.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class AppRoleType(str, Enum): - HOSTED_INSTALLER = "hosted-installer" - INSTALLER = "installer" - ORG_ADMIN = "org_admin" - RUNNER = "runner" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner.py b/nuon/models/app_runner.py deleted file mode 100644 index f0179bd6..00000000 --- a/nuon/models/app_runner.py +++ /dev/null @@ -1,202 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_runner_operation import AppRunnerOperation - - -T = TypeVar("T", bound="AppRunner") - - -@_attrs_define -class AppRunner: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - jobs (Union[Unset, list['AppRunnerJob']]): - name (Union[Unset, str]): - operations (Union[Unset, list['AppRunnerOperation']]): - org_id (Union[Unset, str]): - runner_group_id (Union[Unset, str]): - runner_job (Union[Unset, AppRunnerJob]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - jobs: Union[Unset, list["AppRunnerJob"]] = UNSET - name: Union[Unset, str] = UNSET - operations: Union[Unset, list["AppRunnerOperation"]] = UNSET - org_id: Union[Unset, str] = UNSET - runner_group_id: Union[Unset, str] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - display_name = self.display_name - - id = self.id - - jobs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.jobs, Unset): - jobs = [] - for jobs_item_data in self.jobs: - jobs_item = jobs_item_data.to_dict() - jobs.append(jobs_item) - - name = self.name - - operations: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.operations, Unset): - operations = [] - for operations_item_data in self.operations: - operations_item = operations_item_data.to_dict() - operations.append(operations_item) - - org_id = self.org_id - - runner_group_id = self.runner_group_id - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if display_name is not UNSET: - field_dict["display_name"] = display_name - if id is not UNSET: - field_dict["id"] = id - if jobs is not UNSET: - field_dict["jobs"] = jobs - if name is not UNSET: - field_dict["name"] = name - if operations is not UNSET: - field_dict["operations"] = operations - if org_id is not UNSET: - field_dict["org_id"] = org_id - if runner_group_id is not UNSET: - field_dict["runner_group_id"] = runner_group_id - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_runner_operation import AppRunnerOperation - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - display_name = d.pop("display_name", UNSET) - - id = d.pop("id", UNSET) - - jobs = [] - _jobs = d.pop("jobs", UNSET) - for jobs_item_data in _jobs or []: - jobs_item = AppRunnerJob.from_dict(jobs_item_data) - - jobs.append(jobs_item) - - name = d.pop("name", UNSET) - - operations = [] - _operations = d.pop("operations", UNSET) - for operations_item_data in _operations or []: - operations_item = AppRunnerOperation.from_dict(operations_item_data) - - operations.append(operations_item) - - org_id = d.pop("org_id", UNSET) - - runner_group_id = d.pop("runner_group_id", UNSET) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_runner = cls( - created_at=created_at, - created_by_id=created_by_id, - display_name=display_name, - id=id, - jobs=jobs, - name=name, - operations=operations, - org_id=org_id, - runner_group_id=runner_group_id, - runner_job=runner_job, - status=status, - status_description=status_description, - updated_at=updated_at, - ) - - app_runner.additional_properties = d - return app_runner - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_group.py b/nuon/models/app_runner_group.py deleted file mode 100644 index fa3e13fa..00000000 --- a/nuon/models/app_runner_group.py +++ /dev/null @@ -1,190 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_app_runner_type import AppAppRunnerType -from ..models.app_runner_group_type import AppRunnerGroupType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner import AppRunner - from ..models.app_runner_group_settings import AppRunnerGroupSettings - - -T = TypeVar("T", bound="AppRunnerGroup") - - -@_attrs_define -class AppRunnerGroup: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): parent can org, install or in the future, builtin runner group - owner_type (Union[Unset, str]): - platform (Union[Unset, AppAppRunnerType]): - runners (Union[Unset, list['AppRunner']]): - settings (Union[Unset, AppRunnerGroupSettings]): - type_ (Union[Unset, AppRunnerGroupType]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - platform: Union[Unset, AppAppRunnerType] = UNSET - runners: Union[Unset, list["AppRunner"]] = UNSET - settings: Union[Unset, "AppRunnerGroupSettings"] = UNSET - type_: Union[Unset, AppRunnerGroupType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - platform: Union[Unset, str] = UNSET - if not isinstance(self.platform, Unset): - platform = self.platform.value - - runners: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.runners, Unset): - runners = [] - for runners_item_data in self.runners: - runners_item = runners_item_data.to_dict() - runners.append(runners_item) - - settings: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.settings, Unset): - settings = self.settings.to_dict() - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if platform is not UNSET: - field_dict["platform"] = platform - if runners is not UNSET: - field_dict["runners"] = runners - if settings is not UNSET: - field_dict["settings"] = settings - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner import AppRunner - from ..models.app_runner_group_settings import AppRunnerGroupSettings - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - _platform = d.pop("platform", UNSET) - platform: Union[Unset, AppAppRunnerType] - if isinstance(_platform, Unset): - platform = UNSET - else: - platform = AppAppRunnerType(_platform) - - runners = [] - _runners = d.pop("runners", UNSET) - for runners_item_data in _runners or []: - runners_item = AppRunner.from_dict(runners_item_data) - - runners.append(runners_item) - - _settings = d.pop("settings", UNSET) - settings: Union[Unset, AppRunnerGroupSettings] - if isinstance(_settings, Unset): - settings = UNSET - else: - settings = AppRunnerGroupSettings.from_dict(_settings) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppRunnerGroupType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppRunnerGroupType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_group = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - owner_id=owner_id, - owner_type=owner_type, - platform=platform, - runners=runners, - settings=settings, - type_=type_, - updated_at=updated_at, - ) - - app_runner_group.additional_properties = d - return app_runner_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/nuon/models/app_runner_group_settings.py b/nuon/models/app_runner_group_settings.py deleted file mode 100644 index ea032b7e..00000000 --- a/nuon/models/app_runner_group_settings.py +++ /dev/null @@ -1,309 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_group_settings_aws_tags import AppRunnerGroupSettingsAwsTags - from ..models.app_runner_group_settings_metadata import AppRunnerGroupSettingsMetadata - - -T = TypeVar("T", bound="AppRunnerGroupSettings") - - -@_attrs_define -class AppRunnerGroupSettings: - """ - Attributes: - aws_cloudformation_stack_type (Union[Unset, str]): - aws_instance_type (Union[Unset, str]): aws runner specifics runner-v2 - aws_max_instance_lifetime (Union[Unset, int]): Default: 7 days - aws_tags (Union[Unset, AppRunnerGroupSettingsAwsTags]): - container_image_tag (Union[Unset, str]): - container_image_url (Union[Unset, str]): configuration for deploying the runner - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - enable_logging (Union[Unset, bool]): - enable_metrics (Union[Unset, bool]): - enable_sentry (Union[Unset, bool]): - groups (Union[Unset, list[str]]): the job loop groups the runner should poll for - heart_beat_timeout (Union[Unset, int]): Various settings for the runner to handle internally - id (Union[Unset, str]): - local_aws_iam_role_arn (Union[Unset, str]): - logging_level (Union[Unset, str]): - metadata (Union[Unset, AppRunnerGroupSettingsMetadata]): Metadata is used as both log and metric tags/attributes - in the runner when emitting data - org_aws_iam_role_arn (Union[Unset, str]): org runner specifics - org_id (Union[Unset, str]): - org_k8s_service_account_name (Union[Unset, str]): - otel_collector_config (Union[Unset, str]): - platform (Union[Unset, str]): platform variable for use in the runner - runner_api_url (Union[Unset, str]): - runner_group_id (Union[Unset, str]): - sandbox_mode (Union[Unset, bool]): configuration for managing the runner server side - updated_at (Union[Unset, str]): - """ - - aws_cloudformation_stack_type: Union[Unset, str] = UNSET - aws_instance_type: Union[Unset, str] = UNSET - aws_max_instance_lifetime: Union[Unset, int] = UNSET - aws_tags: Union[Unset, "AppRunnerGroupSettingsAwsTags"] = UNSET - container_image_tag: Union[Unset, str] = UNSET - container_image_url: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - enable_logging: Union[Unset, bool] = UNSET - enable_metrics: Union[Unset, bool] = UNSET - enable_sentry: Union[Unset, bool] = UNSET - groups: Union[Unset, list[str]] = UNSET - heart_beat_timeout: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - local_aws_iam_role_arn: Union[Unset, str] = UNSET - logging_level: Union[Unset, str] = UNSET - metadata: Union[Unset, "AppRunnerGroupSettingsMetadata"] = UNSET - org_aws_iam_role_arn: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - org_k8s_service_account_name: Union[Unset, str] = UNSET - otel_collector_config: Union[Unset, str] = UNSET - platform: Union[Unset, str] = UNSET - runner_api_url: Union[Unset, str] = UNSET - runner_group_id: Union[Unset, str] = UNSET - sandbox_mode: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_cloudformation_stack_type = self.aws_cloudformation_stack_type - - aws_instance_type = self.aws_instance_type - - aws_max_instance_lifetime = self.aws_max_instance_lifetime - - aws_tags: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws_tags, Unset): - aws_tags = self.aws_tags.to_dict() - - container_image_tag = self.container_image_tag - - container_image_url = self.container_image_url - - created_at = self.created_at - - created_by_id = self.created_by_id - - enable_logging = self.enable_logging - - enable_metrics = self.enable_metrics - - enable_sentry = self.enable_sentry - - groups: Union[Unset, list[str]] = UNSET - if not isinstance(self.groups, Unset): - groups = self.groups - - heart_beat_timeout = self.heart_beat_timeout - - id = self.id - - local_aws_iam_role_arn = self.local_aws_iam_role_arn - - logging_level = self.logging_level - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - org_aws_iam_role_arn = self.org_aws_iam_role_arn - - org_id = self.org_id - - org_k8s_service_account_name = self.org_k8s_service_account_name - - otel_collector_config = self.otel_collector_config - - platform = self.platform - - runner_api_url = self.runner_api_url - - runner_group_id = self.runner_group_id - - sandbox_mode = self.sandbox_mode - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws_cloudformation_stack_type is not UNSET: - field_dict["aws_cloudformation_stack_type"] = aws_cloudformation_stack_type - if aws_instance_type is not UNSET: - field_dict["aws_instance_type"] = aws_instance_type - if aws_max_instance_lifetime is not UNSET: - field_dict["aws_max_instance_lifetime"] = aws_max_instance_lifetime - if aws_tags is not UNSET: - field_dict["aws_tags"] = aws_tags - if container_image_tag is not UNSET: - field_dict["container_image_tag"] = container_image_tag - if container_image_url is not UNSET: - field_dict["container_image_url"] = container_image_url - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if enable_logging is not UNSET: - field_dict["enable_logging"] = enable_logging - if enable_metrics is not UNSET: - field_dict["enable_metrics"] = enable_metrics - if enable_sentry is not UNSET: - field_dict["enable_sentry"] = enable_sentry - if groups is not UNSET: - field_dict["groups"] = groups - if heart_beat_timeout is not UNSET: - field_dict["heart_beat_timeout"] = heart_beat_timeout - if id is not UNSET: - field_dict["id"] = id - if local_aws_iam_role_arn is not UNSET: - field_dict["local_aws_iam_role_arn"] = local_aws_iam_role_arn - if logging_level is not UNSET: - field_dict["logging_level"] = logging_level - if metadata is not UNSET: - field_dict["metadata"] = metadata - if org_aws_iam_role_arn is not UNSET: - field_dict["org_aws_iam_role_arn"] = org_aws_iam_role_arn - if org_id is not UNSET: - field_dict["org_id"] = org_id - if org_k8s_service_account_name is not UNSET: - field_dict["org_k8s_service_account_name"] = org_k8s_service_account_name - if otel_collector_config is not UNSET: - field_dict["otel_collector_config"] = otel_collector_config - if platform is not UNSET: - field_dict["platform"] = platform - if runner_api_url is not UNSET: - field_dict["runner_api_url"] = runner_api_url - if runner_group_id is not UNSET: - field_dict["runner_group_id"] = runner_group_id - if sandbox_mode is not UNSET: - field_dict["sandbox_mode"] = sandbox_mode - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_group_settings_aws_tags import AppRunnerGroupSettingsAwsTags - from ..models.app_runner_group_settings_metadata import AppRunnerGroupSettingsMetadata - - d = dict(src_dict) - aws_cloudformation_stack_type = d.pop("aws_cloudformation_stack_type", UNSET) - - aws_instance_type = d.pop("aws_instance_type", UNSET) - - aws_max_instance_lifetime = d.pop("aws_max_instance_lifetime", UNSET) - - _aws_tags = d.pop("aws_tags", UNSET) - aws_tags: Union[Unset, AppRunnerGroupSettingsAwsTags] - if isinstance(_aws_tags, Unset): - aws_tags = UNSET - else: - aws_tags = AppRunnerGroupSettingsAwsTags.from_dict(_aws_tags) - - container_image_tag = d.pop("container_image_tag", UNSET) - - container_image_url = d.pop("container_image_url", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - enable_logging = d.pop("enable_logging", UNSET) - - enable_metrics = d.pop("enable_metrics", UNSET) - - enable_sentry = d.pop("enable_sentry", UNSET) - - groups = cast(list[str], d.pop("groups", UNSET)) - - heart_beat_timeout = d.pop("heart_beat_timeout", UNSET) - - id = d.pop("id", UNSET) - - local_aws_iam_role_arn = d.pop("local_aws_iam_role_arn", UNSET) - - logging_level = d.pop("logging_level", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppRunnerGroupSettingsMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppRunnerGroupSettingsMetadata.from_dict(_metadata) - - org_aws_iam_role_arn = d.pop("org_aws_iam_role_arn", UNSET) - - org_id = d.pop("org_id", UNSET) - - org_k8s_service_account_name = d.pop("org_k8s_service_account_name", UNSET) - - otel_collector_config = d.pop("otel_collector_config", UNSET) - - platform = d.pop("platform", UNSET) - - runner_api_url = d.pop("runner_api_url", UNSET) - - runner_group_id = d.pop("runner_group_id", UNSET) - - sandbox_mode = d.pop("sandbox_mode", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_group_settings = cls( - aws_cloudformation_stack_type=aws_cloudformation_stack_type, - aws_instance_type=aws_instance_type, - aws_max_instance_lifetime=aws_max_instance_lifetime, - aws_tags=aws_tags, - container_image_tag=container_image_tag, - container_image_url=container_image_url, - created_at=created_at, - created_by_id=created_by_id, - enable_logging=enable_logging, - enable_metrics=enable_metrics, - enable_sentry=enable_sentry, - groups=groups, - heart_beat_timeout=heart_beat_timeout, - id=id, - local_aws_iam_role_arn=local_aws_iam_role_arn, - logging_level=logging_level, - metadata=metadata, - org_aws_iam_role_arn=org_aws_iam_role_arn, - org_id=org_id, - org_k8s_service_account_name=org_k8s_service_account_name, - otel_collector_config=otel_collector_config, - platform=platform, - runner_api_url=runner_api_url, - runner_group_id=runner_group_id, - sandbox_mode=sandbox_mode, - updated_at=updated_at, - ) - - app_runner_group_settings.additional_properties = d - return app_runner_group_settings - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_group_settings_aws_tags.py b/nuon/models/app_runner_group_settings_aws_tags.py deleted file mode 100644 index 29661cab..00000000 --- a/nuon/models/app_runner_group_settings_aws_tags.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppRunnerGroupSettingsAwsTags") - - -@_attrs_define -class AppRunnerGroupSettingsAwsTags: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_runner_group_settings_aws_tags = cls() - - app_runner_group_settings_aws_tags.additional_properties = d - return app_runner_group_settings_aws_tags - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_group_settings_metadata.py b/nuon/models/app_runner_group_settings_metadata.py deleted file mode 100644 index 2ac06262..00000000 --- a/nuon/models/app_runner_group_settings_metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppRunnerGroupSettingsMetadata") - - -@_attrs_define -class AppRunnerGroupSettingsMetadata: - """Metadata is used as both log and metric tags/attributes in the runner when emitting data""" - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_runner_group_settings_metadata = cls() - - app_runner_group_settings_metadata.additional_properties = d - return app_runner_group_settings_metadata - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_group_type.py b/nuon/models/app_runner_group_type.py deleted file mode 100644 index c0878d84..00000000 --- a/nuon/models/app_runner_group_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class AppRunnerGroupType(str, Enum): - INSTALL = "install" - ORG = "org" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_health_check.py b/nuon/models/app_runner_health_check.py deleted file mode 100644 index 217f3232..00000000 --- a/nuon/models/app_runner_health_check.py +++ /dev/null @@ -1,152 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_runner_status import AppRunnerStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job import AppRunnerJob - - -T = TypeVar("T", bound="AppRunnerHealthCheck") - - -@_attrs_define -class AppRunnerHealthCheck: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - minute_bucket (Union[Unset, str]): - runner_id (Union[Unset, str]): - runner_job (Union[Unset, AppRunnerJob]): - status (Union[Unset, AppRunnerStatus]): - status_code (Union[Unset, int]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - minute_bucket: Union[Unset, str] = UNSET - runner_id: Union[Unset, str] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - status: Union[Unset, AppRunnerStatus] = UNSET - status_code: Union[Unset, int] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - minute_bucket = self.minute_bucket - - runner_id = self.runner_id - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - status_code = self.status_code - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if minute_bucket is not UNSET: - field_dict["minute_bucket"] = minute_bucket - if runner_id is not UNSET: - field_dict["runner_id"] = runner_id - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if status is not UNSET: - field_dict["status"] = status - if status_code is not UNSET: - field_dict["status_code"] = status_code - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job import AppRunnerJob - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - minute_bucket = d.pop("minute_bucket", UNSET) - - runner_id = d.pop("runner_id", UNSET) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppRunnerStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppRunnerStatus(_status) - - status_code = d.pop("status_code", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_health_check = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - minute_bucket=minute_bucket, - runner_id=runner_id, - runner_job=runner_job, - status=status, - status_code=status_code, - updated_at=updated_at, - ) - - app_runner_health_check.additional_properties = d - return app_runner_health_check - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_heart_beat.py b/nuon/models/app_runner_heart_beat.py deleted file mode 100644 index 7ddaefcb..00000000 --- a/nuon/models/app_runner_heart_beat.py +++ /dev/null @@ -1,122 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppRunnerHeartBeat") - - -@_attrs_define -class AppRunnerHeartBeat: - """ - Attributes: - alive_time (Union[Unset, int]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - runner_id (Union[Unset, str]): - started_at (Union[Unset, str]): - updated_at (Union[Unset, str]): - version (Union[Unset, str]): - """ - - alive_time: Union[Unset, int] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - runner_id: Union[Unset, str] = UNSET - started_at: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alive_time = self.alive_time - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - runner_id = self.runner_id - - started_at = self.started_at - - updated_at = self.updated_at - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if alive_time is not UNSET: - field_dict["alive_time"] = alive_time - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if runner_id is not UNSET: - field_dict["runner_id"] = runner_id - if started_at is not UNSET: - field_dict["started_at"] = started_at - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - alive_time = d.pop("alive_time", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - runner_id = d.pop("runner_id", UNSET) - - started_at = d.pop("started_at", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - version = d.pop("version", UNSET) - - app_runner_heart_beat = cls( - alive_time=alive_time, - created_at=created_at, - created_by_id=created_by_id, - id=id, - runner_id=runner_id, - started_at=started_at, - updated_at=updated_at, - version=version, - ) - - app_runner_heart_beat.additional_properties = d - return app_runner_heart_beat - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job.py b/nuon/models/app_runner_job.py deleted file mode 100644 index 6509aa58..00000000 --- a/nuon/models/app_runner_job.py +++ /dev/null @@ -1,370 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_runner_job_group import AppRunnerJobGroup -from ..models.app_runner_job_operation_type import AppRunnerJobOperationType -from ..models.app_runner_job_status import AppRunnerJobStatus -from ..models.app_runner_job_type import AppRunnerJobType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job_execution import AppRunnerJobExecution - from ..models.app_runner_job_metadata import AppRunnerJobMetadata - from ..models.app_runner_job_outputs import AppRunnerJobOutputs - - -T = TypeVar("T", bound="AppRunnerJob") - - -@_attrs_define -class AppRunnerJob: - """ - Attributes: - available_timeout (Union[Unset, int]): available timeout is how long a job can be marked as "available" before - being requeued - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - execution_count (Union[Unset, int]): - execution_time (Union[Unset, int]): - execution_timeout (Union[Unset, int]): execution timeout is how long a job can be marked as "exeucuting" before - being requeued - executions (Union[Unset, list['AppRunnerJobExecution']]): - final_runner_job_execution_id (Union[Unset, str]): - finished_at (Union[Unset, str]): - group (Union[Unset, AppRunnerJobGroup]): - id (Union[Unset, str]): - log_stream_id (Union[Unset, str]): - max_executions (Union[Unset, int]): - metadata (Union[Unset, AppRunnerJobMetadata]): - operation (Union[Unset, AppRunnerJobOperationType]): - org_id (Union[Unset, str]): - outputs (Union[Unset, AppRunnerJobOutputs]): - outputs_json (Union[Unset, str]): - overall_timeout (Union[Unset, int]): overall timeout is how long a job can be attempted, before being cancelled - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - queue_timeout (Union[Unset, int]): queue timeout is how long a job can be queued, before being made available - runner_id (Union[Unset, str]): - started_at (Union[Unset, str]): - status (Union[Unset, AppRunnerJobStatus]): - status_description (Union[Unset, str]): - type_ (Union[Unset, AppRunnerJobType]): - updated_at (Union[Unset, str]): - """ - - available_timeout: Union[Unset, int] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_count: Union[Unset, int] = UNSET - execution_time: Union[Unset, int] = UNSET - execution_timeout: Union[Unset, int] = UNSET - executions: Union[Unset, list["AppRunnerJobExecution"]] = UNSET - final_runner_job_execution_id: Union[Unset, str] = UNSET - finished_at: Union[Unset, str] = UNSET - group: Union[Unset, AppRunnerJobGroup] = UNSET - id: Union[Unset, str] = UNSET - log_stream_id: Union[Unset, str] = UNSET - max_executions: Union[Unset, int] = UNSET - metadata: Union[Unset, "AppRunnerJobMetadata"] = UNSET - operation: Union[Unset, AppRunnerJobOperationType] = UNSET - org_id: Union[Unset, str] = UNSET - outputs: Union[Unset, "AppRunnerJobOutputs"] = UNSET - outputs_json: Union[Unset, str] = UNSET - overall_timeout: Union[Unset, int] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - queue_timeout: Union[Unset, int] = UNSET - runner_id: Union[Unset, str] = UNSET - started_at: Union[Unset, str] = UNSET - status: Union[Unset, AppRunnerJobStatus] = UNSET - status_description: Union[Unset, str] = UNSET - type_: Union[Unset, AppRunnerJobType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - available_timeout = self.available_timeout - - created_at = self.created_at - - created_by_id = self.created_by_id - - execution_count = self.execution_count - - execution_time = self.execution_time - - execution_timeout = self.execution_timeout - - executions: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.executions, Unset): - executions = [] - for executions_item_data in self.executions: - executions_item = executions_item_data.to_dict() - executions.append(executions_item) - - final_runner_job_execution_id = self.final_runner_job_execution_id - - finished_at = self.finished_at - - group: Union[Unset, str] = UNSET - if not isinstance(self.group, Unset): - group = self.group.value - - id = self.id - - log_stream_id = self.log_stream_id - - max_executions = self.max_executions - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - operation: Union[Unset, str] = UNSET - if not isinstance(self.operation, Unset): - operation = self.operation.value - - org_id = self.org_id - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - outputs_json = self.outputs_json - - overall_timeout = self.overall_timeout - - owner_id = self.owner_id - - owner_type = self.owner_type - - queue_timeout = self.queue_timeout - - runner_id = self.runner_id - - started_at = self.started_at - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - status_description = self.status_description - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if available_timeout is not UNSET: - field_dict["available_timeout"] = available_timeout - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if execution_count is not UNSET: - field_dict["execution_count"] = execution_count - if execution_time is not UNSET: - field_dict["execution_time"] = execution_time - if execution_timeout is not UNSET: - field_dict["execution_timeout"] = execution_timeout - if executions is not UNSET: - field_dict["executions"] = executions - if final_runner_job_execution_id is not UNSET: - field_dict["final_runner_job_execution_id"] = final_runner_job_execution_id - if finished_at is not UNSET: - field_dict["finished_at"] = finished_at - if group is not UNSET: - field_dict["group"] = group - if id is not UNSET: - field_dict["id"] = id - if log_stream_id is not UNSET: - field_dict["log_stream_id"] = log_stream_id - if max_executions is not UNSET: - field_dict["max_executions"] = max_executions - if metadata is not UNSET: - field_dict["metadata"] = metadata - if operation is not UNSET: - field_dict["operation"] = operation - if org_id is not UNSET: - field_dict["org_id"] = org_id - if outputs is not UNSET: - field_dict["outputs"] = outputs - if outputs_json is not UNSET: - field_dict["outputs_json"] = outputs_json - if overall_timeout is not UNSET: - field_dict["overall_timeout"] = overall_timeout - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if queue_timeout is not UNSET: - field_dict["queue_timeout"] = queue_timeout - if runner_id is not UNSET: - field_dict["runner_id"] = runner_id - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job_execution import AppRunnerJobExecution - from ..models.app_runner_job_metadata import AppRunnerJobMetadata - from ..models.app_runner_job_outputs import AppRunnerJobOutputs - - d = dict(src_dict) - available_timeout = d.pop("available_timeout", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - execution_count = d.pop("execution_count", UNSET) - - execution_time = d.pop("execution_time", UNSET) - - execution_timeout = d.pop("execution_timeout", UNSET) - - executions = [] - _executions = d.pop("executions", UNSET) - for executions_item_data in _executions or []: - executions_item = AppRunnerJobExecution.from_dict(executions_item_data) - - executions.append(executions_item) - - final_runner_job_execution_id = d.pop("final_runner_job_execution_id", UNSET) - - finished_at = d.pop("finished_at", UNSET) - - _group = d.pop("group", UNSET) - group: Union[Unset, AppRunnerJobGroup] - if isinstance(_group, Unset): - group = UNSET - else: - group = AppRunnerJobGroup(_group) - - id = d.pop("id", UNSET) - - log_stream_id = d.pop("log_stream_id", UNSET) - - max_executions = d.pop("max_executions", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppRunnerJobMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppRunnerJobMetadata.from_dict(_metadata) - - _operation = d.pop("operation", UNSET) - operation: Union[Unset, AppRunnerJobOperationType] - if isinstance(_operation, Unset): - operation = UNSET - else: - operation = AppRunnerJobOperationType(_operation) - - org_id = d.pop("org_id", UNSET) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppRunnerJobOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = AppRunnerJobOutputs.from_dict(_outputs) - - outputs_json = d.pop("outputs_json", UNSET) - - overall_timeout = d.pop("overall_timeout", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - queue_timeout = d.pop("queue_timeout", UNSET) - - runner_id = d.pop("runner_id", UNSET) - - started_at = d.pop("started_at", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppRunnerJobStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppRunnerJobStatus(_status) - - status_description = d.pop("status_description", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppRunnerJobType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppRunnerJobType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_job = cls( - available_timeout=available_timeout, - created_at=created_at, - created_by_id=created_by_id, - execution_count=execution_count, - execution_time=execution_time, - execution_timeout=execution_timeout, - executions=executions, - final_runner_job_execution_id=final_runner_job_execution_id, - finished_at=finished_at, - group=group, - id=id, - log_stream_id=log_stream_id, - max_executions=max_executions, - metadata=metadata, - operation=operation, - org_id=org_id, - outputs=outputs, - outputs_json=outputs_json, - overall_timeout=overall_timeout, - owner_id=owner_id, - owner_type=owner_type, - queue_timeout=queue_timeout, - runner_id=runner_id, - started_at=started_at, - status=status, - status_description=status_description, - type_=type_, - updated_at=updated_at, - ) - - app_runner_job.additional_properties = d - return app_runner_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/nuon/models/app_runner_job_execution.py b/nuon/models/app_runner_job_execution.py deleted file mode 100644 index 508d6585..00000000 --- a/nuon/models/app_runner_job_execution.py +++ /dev/null @@ -1,161 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_runner_job_execution_status import AppRunnerJobExecutionStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job_execution_outputs import AppRunnerJobExecutionOutputs - from ..models.app_runner_job_execution_result import AppRunnerJobExecutionResult - - -T = TypeVar("T", bound="AppRunnerJobExecution") - - -@_attrs_define -class AppRunnerJobExecution: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - outputs (Union[Unset, AppRunnerJobExecutionOutputs]): - result (Union[Unset, AppRunnerJobExecutionResult]): - runner_job_id (Union[Unset, str]): - status (Union[Unset, AppRunnerJobExecutionStatus]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - outputs: Union[Unset, "AppRunnerJobExecutionOutputs"] = UNSET - result: Union[Unset, "AppRunnerJobExecutionResult"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - status: Union[Unset, AppRunnerJobExecutionStatus] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - result: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.result, Unset): - result = self.result.to_dict() - - runner_job_id = self.runner_job_id - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if outputs is not UNSET: - field_dict["outputs"] = outputs - if result is not UNSET: - field_dict["result"] = result - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job_execution_outputs import AppRunnerJobExecutionOutputs - from ..models.app_runner_job_execution_result import AppRunnerJobExecutionResult - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppRunnerJobExecutionOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = AppRunnerJobExecutionOutputs.from_dict(_outputs) - - _result = d.pop("result", UNSET) - result: Union[Unset, AppRunnerJobExecutionResult] - if isinstance(_result, Unset): - result = UNSET - else: - result = AppRunnerJobExecutionResult.from_dict(_result) - - runner_job_id = d.pop("runner_job_id", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppRunnerJobExecutionStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppRunnerJobExecutionStatus(_status) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_job_execution = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - outputs=outputs, - result=result, - runner_job_id=runner_job_id, - status=status, - updated_at=updated_at, - ) - - app_runner_job_execution.additional_properties = d - return app_runner_job_execution - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_outputs.py b/nuon/models/app_runner_job_execution_outputs.py deleted file mode 100644 index 00c1c69b..00000000 --- a/nuon/models/app_runner_job_execution_outputs.py +++ /dev/null @@ -1,135 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job_execution_outputs_outputs import AppRunnerJobExecutionOutputsOutputs - - -T = TypeVar("T", bound="AppRunnerJobExecutionOutputs") - - -@_attrs_define -class AppRunnerJobExecutionOutputs: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - outputs (Union[Unset, AppRunnerJobExecutionOutputsOutputs]): - outputs_json (Union[Unset, str]): - runner_job_execution_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - outputs: Union[Unset, "AppRunnerJobExecutionOutputsOutputs"] = UNSET - outputs_json: Union[Unset, str] = UNSET - runner_job_execution_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - outputs_json = self.outputs_json - - runner_job_execution_id = self.runner_job_execution_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if outputs is not UNSET: - field_dict["outputs"] = outputs - if outputs_json is not UNSET: - field_dict["outputs_json"] = outputs_json - if runner_job_execution_id is not UNSET: - field_dict["runner_job_execution_id"] = runner_job_execution_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job_execution_outputs_outputs import AppRunnerJobExecutionOutputsOutputs - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppRunnerJobExecutionOutputsOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = AppRunnerJobExecutionOutputsOutputs.from_dict(_outputs) - - outputs_json = d.pop("outputs_json", UNSET) - - runner_job_execution_id = d.pop("runner_job_execution_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_job_execution_outputs = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - outputs=outputs, - outputs_json=outputs_json, - runner_job_execution_id=runner_job_execution_id, - updated_at=updated_at, - ) - - app_runner_job_execution_outputs.additional_properties = d - return app_runner_job_execution_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_outputs_outputs.py b/nuon/models/app_runner_job_execution_outputs_outputs.py deleted file mode 100644 index bbbd229f..00000000 --- a/nuon/models/app_runner_job_execution_outputs_outputs.py +++ /dev/null @@ -1,63 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.app_runner_job_execution_outputs_outputs_additional_property import ( - AppRunnerJobExecutionOutputsOutputsAdditionalProperty, - ) - - -T = TypeVar("T", bound="AppRunnerJobExecutionOutputsOutputs") - - -@_attrs_define -class AppRunnerJobExecutionOutputsOutputs: - """ """ - - additional_properties: dict[str, "AppRunnerJobExecutionOutputsOutputsAdditionalProperty"] = _attrs_field( - 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(): - field_dict[prop_name] = prop.to_dict() - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job_execution_outputs_outputs_additional_property import ( - AppRunnerJobExecutionOutputsOutputsAdditionalProperty, - ) - - d = dict(src_dict) - app_runner_job_execution_outputs_outputs = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = AppRunnerJobExecutionOutputsOutputsAdditionalProperty.from_dict(prop_dict) - - additional_properties[prop_name] = additional_property - - app_runner_job_execution_outputs_outputs.additional_properties = additional_properties - return app_runner_job_execution_outputs_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> "AppRunnerJobExecutionOutputsOutputsAdditionalProperty": - return self.additional_properties[key] - - def __setitem__(self, key: str, value: "AppRunnerJobExecutionOutputsOutputsAdditionalProperty") -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py b/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py deleted file mode 100644 index 908a5ba5..00000000 --- a/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppRunnerJobExecutionOutputsOutputsAdditionalProperty") - - -@_attrs_define -class AppRunnerJobExecutionOutputsOutputsAdditionalProperty: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_runner_job_execution_outputs_outputs_additional_property = cls() - - app_runner_job_execution_outputs_outputs_additional_property.additional_properties = d - return app_runner_job_execution_outputs_outputs_additional_property - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_result.py b/nuon/models/app_runner_job_execution_result.py deleted file mode 100644 index 2ebe695b..00000000 --- a/nuon/models/app_runner_job_execution_result.py +++ /dev/null @@ -1,180 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata - - -T = TypeVar("T", bound="AppRunnerJobExecutionResult") - - -@_attrs_define -class AppRunnerJobExecutionResult: - """ - Attributes: - contents (Union[Unset, str]): - contents_display (Union[Unset, str]): - contents_display_gzip (Union[Unset, str]): - contents_gzip (Union[Unset, str]): columns for storage of gzipped contents and plans - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - error_code (Union[Unset, int]): - error_metadata (Union[Unset, AppRunnerJobExecutionResultErrorMetadata]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - runner_job_execution_id (Union[Unset, str]): - success (Union[Unset, bool]): - updated_at (Union[Unset, str]): - """ - - contents: Union[Unset, str] = UNSET - contents_display: Union[Unset, str] = UNSET - contents_display_gzip: Union[Unset, str] = UNSET - contents_gzip: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - error_code: Union[Unset, int] = UNSET - error_metadata: Union[Unset, "AppRunnerJobExecutionResultErrorMetadata"] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - runner_job_execution_id: Union[Unset, str] = UNSET - success: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - contents = self.contents - - contents_display = self.contents_display - - contents_display_gzip = self.contents_display_gzip - - contents_gzip = self.contents_gzip - - created_at = self.created_at - - created_by_id = self.created_by_id - - error_code = self.error_code - - error_metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.error_metadata, Unset): - error_metadata = self.error_metadata.to_dict() - - id = self.id - - org_id = self.org_id - - runner_job_execution_id = self.runner_job_execution_id - - success = self.success - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if contents_display is not UNSET: - field_dict["contents_display"] = contents_display - if contents_display_gzip is not UNSET: - field_dict["contents_display_gzip"] = contents_display_gzip - if contents_gzip is not UNSET: - field_dict["contents_gzip"] = contents_gzip - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if error_code is not UNSET: - field_dict["error_code"] = error_code - if error_metadata is not UNSET: - field_dict["error_metadata"] = error_metadata - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if runner_job_execution_id is not UNSET: - field_dict["runner_job_execution_id"] = runner_job_execution_id - if success is not UNSET: - field_dict["success"] = success - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata - - d = dict(src_dict) - contents = d.pop("contents", UNSET) - - contents_display = d.pop("contents_display", UNSET) - - contents_display_gzip = d.pop("contents_display_gzip", UNSET) - - contents_gzip = d.pop("contents_gzip", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - error_code = d.pop("error_code", UNSET) - - _error_metadata = d.pop("error_metadata", UNSET) - error_metadata: Union[Unset, AppRunnerJobExecutionResultErrorMetadata] - if isinstance(_error_metadata, Unset): - error_metadata = UNSET - else: - error_metadata = AppRunnerJobExecutionResultErrorMetadata.from_dict(_error_metadata) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - runner_job_execution_id = d.pop("runner_job_execution_id", UNSET) - - success = d.pop("success", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_job_execution_result = cls( - contents=contents, - contents_display=contents_display, - contents_display_gzip=contents_display_gzip, - contents_gzip=contents_gzip, - created_at=created_at, - created_by_id=created_by_id, - error_code=error_code, - error_metadata=error_metadata, - id=id, - org_id=org_id, - runner_job_execution_id=runner_job_execution_id, - success=success, - updated_at=updated_at, - ) - - app_runner_job_execution_result.additional_properties = d - return app_runner_job_execution_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/nuon/models/app_runner_job_execution_result_error_metadata.py b/nuon/models/app_runner_job_execution_result_error_metadata.py deleted file mode 100644 index 1c5efc8c..00000000 --- a/nuon/models/app_runner_job_execution_result_error_metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppRunnerJobExecutionResultErrorMetadata") - - -@_attrs_define -class AppRunnerJobExecutionResultErrorMetadata: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_runner_job_execution_result_error_metadata = cls() - - app_runner_job_execution_result_error_metadata.additional_properties = d - return app_runner_job_execution_result_error_metadata - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_status.py b/nuon/models/app_runner_job_execution_status.py deleted file mode 100644 index 8b6e7bb4..00000000 --- a/nuon/models/app_runner_job_execution_status.py +++ /dev/null @@ -1,17 +0,0 @@ -from enum import Enum - - -class AppRunnerJobExecutionStatus(str, Enum): - CANCELLED = "cancelled" - CLEANING_UP = "cleaning-up" - FAILED = "failed" - FINISHED = "finished" - INITIALIZING = "initializing" - IN_PROGRESS = "in-progress" - NOT_ATTEMPTED = "not-attempted" - PENDING = "pending" - TIMED_OUT = "timed-out" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_job_group.py b/nuon/models/app_runner_job_group.py deleted file mode 100644 index 5e645359..00000000 --- a/nuon/models/app_runner_job_group.py +++ /dev/null @@ -1,18 +0,0 @@ -from enum import Enum - - -class AppRunnerJobGroup(str, Enum): - ACTIONS = "actions" - ANY = "any" - BUILD = "build" - DEPLOY = "deploy" - HEALTH_CHECKS = "health-checks" - MANAGEMENT = "management" - OPERATIONS = "operations" - RUNNER = "runner" - SANDBOX = "sandbox" - SYNC = "sync" - VALUE_9 = "" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_job_metadata.py b/nuon/models/app_runner_job_metadata.py deleted file mode 100644 index af0e61b4..00000000 --- a/nuon/models/app_runner_job_metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppRunnerJobMetadata") - - -@_attrs_define -class AppRunnerJobMetadata: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_runner_job_metadata = cls() - - app_runner_job_metadata.additional_properties = d - return app_runner_job_metadata - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_operation_type.py b/nuon/models/app_runner_job_operation_type.py deleted file mode 100644 index 72971d55..00000000 --- a/nuon/models/app_runner_job_operation_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class AppRunnerJobOperationType(str, Enum): - APPLY_PLAN = "apply-plan" - BUILD = "build" - CREATE_APPLY_PLAN = "create-apply-plan" - CREATE_TEARDOWN_PLAN = "create-teardown-plan" - EXEC = "exec" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_job_outputs.py b/nuon/models/app_runner_job_outputs.py deleted file mode 100644 index 63ce8ca0..00000000 --- a/nuon/models/app_runner_job_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppRunnerJobOutputs") - - -@_attrs_define -class AppRunnerJobOutputs: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_runner_job_outputs = cls() - - app_runner_job_outputs.additional_properties = d - return app_runner_job_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_job_status.py b/nuon/models/app_runner_job_status.py deleted file mode 100644 index 75a1f8fa..00000000 --- a/nuon/models/app_runner_job_status.py +++ /dev/null @@ -1,16 +0,0 @@ -from enum import Enum - - -class AppRunnerJobStatus(str, Enum): - AVAILABLE = "available" - CANCELLED = "cancelled" - FAILED = "failed" - FINISHED = "finished" - IN_PROGRESS = "in-progress" - NOT_ATTEMPTED = "not-attempted" - QUEUED = "queued" - TIMED_OUT = "timed-out" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_job_type.py b/nuon/models/app_runner_job_type.py deleted file mode 100644 index 5554d910..00000000 --- a/nuon/models/app_runner_job_type.py +++ /dev/null @@ -1,34 +0,0 @@ -from enum import Enum - - -class AppRunnerJobType(str, Enum): - ACTIONS_WORKFLOW = "actions-workflow" - CONTAINER_IMAGE_BUILD = "container-image-build" - DOCKER_BUILD = "docker-build" - HEALTH_CHECK = "health-check" - HELM_CHART_BUILD = "helm-chart-build" - HELM_CHART_DEPLOY = "helm-chart-deploy" - JOB_DEPLOY = "job-deploy" - KUBERNETES_MANIFEST_DEPLOY = "kubernetes-manifest-deploy" - MNG_RUNNER_RESTART = "mng-runner-restart" - MNG_RUNNER_UPDATE_VERSION = "mng-runner-update-version" - MNG_SHUT_DOWN = "mng-shut-down" - MNG_VM_SHUT_DOWN = "mng-vm-shut-down" - NOOP = "noop" - NOOP_BUILD = "noop-build" - NOOP_DEPLOY = "noop-deploy" - NOOP_SYNC = "noop-sync" - OCI_SYNC = "oci-sync" - RUNNER_HELM = "runner-helm" - RUNNER_LOCAL = "runner-local" - RUNNER_TERRAFORM = "runner-terraform" - SANDBOX_SYNC_SECRETS = "sandbox-sync-secrets" - SANDBOX_TERRAFORM = "sandbox-terraform" - SANDBOX_TERRAFORM_PLAN = "sandbox-terraform-plan" - SHUT_DOWN = "shut-down" - TERRAFORM_DEPLOY = "terraform-deploy" - TERRAFORM_MODULE_BUILD = "terraform-module-build" - UPDATE_VERSION = "update-version" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_operation.py b/nuon/models/app_runner_operation.py deleted file mode 100644 index b327004a..00000000 --- a/nuon/models/app_runner_operation.py +++ /dev/null @@ -1,152 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_runner_operation_type import AppRunnerOperationType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_log_stream import AppLogStream - - -T = TypeVar("T", bound="AppRunnerOperation") - - -@_attrs_define -class AppRunnerOperation: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - log_stream (Union[Unset, AppLogStream]): - operation_type (Union[Unset, AppRunnerOperationType]): - runner_id (Union[Unset, str]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - operation_type: Union[Unset, AppRunnerOperationType] = UNSET - runner_id: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - log_stream: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.log_stream, Unset): - log_stream = self.log_stream.to_dict() - - operation_type: Union[Unset, str] = UNSET - if not isinstance(self.operation_type, Unset): - operation_type = self.operation_type.value - - runner_id = self.runner_id - - status = self.status - - status_description = self.status_description - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if log_stream is not UNSET: - field_dict["log_stream"] = log_stream - if operation_type is not UNSET: - field_dict["operation_type"] = operation_type - if runner_id is not UNSET: - field_dict["runner_id"] = runner_id - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_log_stream import AppLogStream - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] - if isinstance(_log_stream, Unset): - log_stream = UNSET - else: - log_stream = AppLogStream.from_dict(_log_stream) - - _operation_type = d.pop("operation_type", UNSET) - operation_type: Union[Unset, AppRunnerOperationType] - if isinstance(_operation_type, Unset): - operation_type = UNSET - else: - operation_type = AppRunnerOperationType(_operation_type) - - runner_id = d.pop("runner_id", UNSET) - - status = d.pop("status", UNSET) - - status_description = d.pop("status_description", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_runner_operation = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - log_stream=log_stream, - operation_type=operation_type, - runner_id=runner_id, - status=status, - status_description=status_description, - updated_at=updated_at, - ) - - app_runner_operation.additional_properties = d - return app_runner_operation - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_runner_operation_type.py b/nuon/models/app_runner_operation_type.py deleted file mode 100644 index 7cd8b145..00000000 --- a/nuon/models/app_runner_operation_type.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class AppRunnerOperationType(str, Enum): - DEPROVISION = "deprovision" - PROVISION = "provision" - PROVISION_SERVICE_ACCOUNT = "provision_service_account" - REPROVISION = "reprovision" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_runner_status.py b/nuon/models/app_runner_status.py deleted file mode 100644 index aca1b4c8..00000000 --- a/nuon/models/app_runner_status.py +++ /dev/null @@ -1,17 +0,0 @@ -from enum import Enum - - -class AppRunnerStatus(str, Enum): - ACTIVE = "active" - AWAITING_INSTALL_STACK_RUN = "awaiting-install-stack-run" - DEPROVISIONED = "deprovisioned" - DEPROVISIONING = "deprovisioning" - ERROR = "error" - OFFLINE = "offline" - PENDING = "pending" - PROVISIONING = "provisioning" - REPROVISIONING = "reprovisioning" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_sandbox_run_type.py b/nuon/models/app_sandbox_run_type.py deleted file mode 100644 index 3f0c6c4a..00000000 --- a/nuon/models/app_sandbox_run_type.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class AppSandboxRunType(str, Enum): - DEPROVISION = "deprovision" - PROVISION = "provision" - REPROVISION = "reprovision" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_stack_type.py b/nuon/models/app_stack_type.py deleted file mode 100644 index 8e51431c..00000000 --- a/nuon/models/app_stack_type.py +++ /dev/null @@ -1,8 +0,0 @@ -from enum import Enum - - -class AppStackType(str, Enum): - AWS_CLOUDFORMATION = "aws-cloudformation" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_status.py b/nuon/models/app_status.py deleted file mode 100644 index 21c366e3..00000000 --- a/nuon/models/app_status.py +++ /dev/null @@ -1,30 +0,0 @@ -from enum import Enum - - -class AppStatus(str, Enum): - ACTIVE = "active" - APPLYING = "applying" - APPROVAL_AWAITING = "approval-awaiting" - APPROVAL_DENIED = "approval-denied" - APPROVAL_EXPIRED = "approval-expired" - APPROVAL_RETRY = "approval-retry" - APPROVED = "approved" - AWAITING_USER_RUN = "awaiting-user-run" - CANCELLED = "cancelled" - DISCARDED = "discarded" - ERROR = "error" - EXPIRED = "expired" - GENERATING = "generating" - IN_PROGRESS = "in-progress" - NOOP = "noop" - NOT_ATTEMPTED = "not-attempted" - OUTDATED = "outdated" - PENDING = "pending" - PLANNING = "planning" - PROVISIONING = "provisioning" - RETRYING = "retrying" - SUCCESS = "success" - USER_SKIPPED = "user-skipped" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_step_error_behavior.py b/nuon/models/app_step_error_behavior.py deleted file mode 100644 index 323570f9..00000000 --- a/nuon/models/app_step_error_behavior.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class AppStepErrorBehavior(str, Enum): - ABORT = "abort" - CONTINUE = "continue" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_terraform_lock.py b/nuon/models/app_terraform_lock.py deleted file mode 100644 index 07595a65..00000000 --- a/nuon/models/app_terraform_lock.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppTerraformLock") - - -@_attrs_define -class AppTerraformLock: - """ - Attributes: - created (Union[Unset, str]): - id (Union[Unset, str]): - info (Union[Unset, str]): - operation (Union[Unset, str]): - path (Union[Unset, str]): - version (Union[Unset, Any]): - who (Union[Unset, str]): - """ - - created: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - info: Union[Unset, str] = UNSET - operation: Union[Unset, str] = UNSET - path: Union[Unset, str] = UNSET - version: Union[Unset, Any] = UNSET - who: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created = self.created - - id = self.id - - info = self.info - - operation = self.operation - - path = self.path - - version = self.version - - who = self.who - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created is not UNSET: - field_dict["created"] = created - if id is not UNSET: - field_dict["id"] = id - if info is not UNSET: - field_dict["info"] = info - if operation is not UNSET: - field_dict["operation"] = operation - if path is not UNSET: - field_dict["path"] = path - if version is not UNSET: - field_dict["version"] = version - if who is not UNSET: - field_dict["who"] = who - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created = d.pop("created", UNSET) - - id = d.pop("id", UNSET) - - info = d.pop("info", UNSET) - - operation = d.pop("operation", UNSET) - - path = d.pop("path", UNSET) - - version = d.pop("version", UNSET) - - who = d.pop("who", UNSET) - - app_terraform_lock = cls( - created=created, - id=id, - info=info, - operation=operation, - path=path, - version=version, - who=who, - ) - - app_terraform_lock.additional_properties = d - return app_terraform_lock - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_module_component_config.py b/nuon/models/app_terraform_module_component_config.py deleted file mode 100644 index fdfbcf50..00000000 --- a/nuon/models/app_terraform_module_component_config.py +++ /dev/null @@ -1,191 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - from ..models.app_terraform_module_component_config_env_vars import AppTerraformModuleComponentConfigEnvVars - from ..models.app_terraform_module_component_config_variables import AppTerraformModuleComponentConfigVariables - - -T = TypeVar("T", bound="AppTerraformModuleComponentConfig") - - -@_attrs_define -class AppTerraformModuleComponentConfig: - """ - Attributes: - component_config_connection_id (Union[Unset, str]): parent reference - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppTerraformModuleComponentConfigEnvVars]): - id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - updated_at (Union[Unset, str]): - variables (Union[Unset, AppTerraformModuleComponentConfigVariables]): - variables_files (Union[Unset, list[str]]): - version (Union[Unset, str]): terraform configuration values - """ - - component_config_connection_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppTerraformModuleComponentConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - updated_at: Union[Unset, str] = UNSET - variables: Union[Unset, "AppTerraformModuleComponentConfigVariables"] = UNSET - variables_files: Union[Unset, list[str]] = UNSET - version: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - component_config_connection_id = self.component_config_connection_id - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - created_at = self.created_at - - created_by_id = self.created_by_id - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - id = self.id - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - updated_at = self.updated_at - - variables: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.variables, Unset): - variables = self.variables.to_dict() - - variables_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.variables_files, Unset): - variables_files = self.variables_files - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if component_config_connection_id is not UNSET: - field_dict["component_config_connection_id"] = component_config_connection_id - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if id is not UNSET: - field_dict["id"] = id - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if variables is not UNSET: - field_dict["variables"] = variables - if variables_files is not UNSET: - field_dict["variables_files"] = variables_files - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig - from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig - from ..models.app_terraform_module_component_config_env_vars import AppTerraformModuleComponentConfigEnvVars - from ..models.app_terraform_module_component_config_variables import AppTerraformModuleComponentConfigVariables - - d = dict(src_dict) - component_config_connection_id = d.pop("component_config_connection_id", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppTerraformModuleComponentConfigEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = AppTerraformModuleComponentConfigEnvVars.from_dict(_env_vars) - - id = d.pop("id", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) - - updated_at = d.pop("updated_at", UNSET) - - _variables = d.pop("variables", UNSET) - variables: Union[Unset, AppTerraformModuleComponentConfigVariables] - if isinstance(_variables, Unset): - variables = UNSET - else: - variables = AppTerraformModuleComponentConfigVariables.from_dict(_variables) - - variables_files = cast(list[str], d.pop("variables_files", UNSET)) - - version = d.pop("version", UNSET) - - app_terraform_module_component_config = cls( - component_config_connection_id=component_config_connection_id, - connected_github_vcs_config=connected_github_vcs_config, - created_at=created_at, - created_by_id=created_by_id, - env_vars=env_vars, - id=id, - public_git_vcs_config=public_git_vcs_config, - updated_at=updated_at, - variables=variables, - variables_files=variables_files, - version=version, - ) - - app_terraform_module_component_config.additional_properties = d - return app_terraform_module_component_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_module_component_config_env_vars.py b/nuon/models/app_terraform_module_component_config_env_vars.py deleted file mode 100644 index eaeb8778..00000000 --- a/nuon/models/app_terraform_module_component_config_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppTerraformModuleComponentConfigEnvVars") - - -@_attrs_define -class AppTerraformModuleComponentConfigEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_terraform_module_component_config_env_vars = cls() - - app_terraform_module_component_config_env_vars.additional_properties = d - return app_terraform_module_component_config_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_module_component_config_variables.py b/nuon/models/app_terraform_module_component_config_variables.py deleted file mode 100644 index 6be5d8b3..00000000 --- a/nuon/models/app_terraform_module_component_config_variables.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppTerraformModuleComponentConfigVariables") - - -@_attrs_define -class AppTerraformModuleComponentConfigVariables: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_terraform_module_component_config_variables = cls() - - app_terraform_module_component_config_variables.additional_properties = d - return app_terraform_module_component_config_variables - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_state_instance.py b/nuon/models/app_terraform_state_instance.py deleted file mode 100644 index 4ea01d7d..00000000 --- a/nuon/models/app_terraform_state_instance.py +++ /dev/null @@ -1,92 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_terraform_state_instance_attributes import AppTerraformStateInstanceAttributes - - -T = TypeVar("T", bound="AppTerraformStateInstance") - - -@_attrs_define -class AppTerraformStateInstance: - """ - Attributes: - attributes (Union[Unset, AppTerraformStateInstanceAttributes]): - schema_version (Union[Unset, int]): - sensitive_attributes (Union[Unset, list[Any]]): - """ - - attributes: Union[Unset, "AppTerraformStateInstanceAttributes"] = UNSET - schema_version: Union[Unset, int] = UNSET - sensitive_attributes: Union[Unset, list[Any]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - attributes: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.attributes, Unset): - attributes = self.attributes.to_dict() - - schema_version = self.schema_version - - sensitive_attributes: Union[Unset, list[Any]] = UNSET - if not isinstance(self.sensitive_attributes, Unset): - sensitive_attributes = self.sensitive_attributes - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if attributes is not UNSET: - field_dict["attributes"] = attributes - if schema_version is not UNSET: - field_dict["schema_version"] = schema_version - if sensitive_attributes is not UNSET: - field_dict["sensitive_attributes"] = sensitive_attributes - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_terraform_state_instance_attributes import AppTerraformStateInstanceAttributes - - d = dict(src_dict) - _attributes = d.pop("attributes", UNSET) - attributes: Union[Unset, AppTerraformStateInstanceAttributes] - if isinstance(_attributes, Unset): - attributes = UNSET - else: - attributes = AppTerraformStateInstanceAttributes.from_dict(_attributes) - - schema_version = d.pop("schema_version", UNSET) - - sensitive_attributes = cast(list[Any], d.pop("sensitive_attributes", UNSET)) - - app_terraform_state_instance = cls( - attributes=attributes, - schema_version=schema_version, - sensitive_attributes=sensitive_attributes, - ) - - app_terraform_state_instance.additional_properties = d - return app_terraform_state_instance - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_state_instance_attributes.py b/nuon/models/app_terraform_state_instance_attributes.py deleted file mode 100644 index 9c9c3294..00000000 --- a/nuon/models/app_terraform_state_instance_attributes.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppTerraformStateInstanceAttributes") - - -@_attrs_define -class AppTerraformStateInstanceAttributes: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_terraform_state_instance_attributes = cls() - - app_terraform_state_instance_attributes.additional_properties = d - return app_terraform_state_instance_attributes - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_state_resource.py b/nuon/models/app_terraform_state_resource.py deleted file mode 100644 index f0b75eb8..00000000 --- a/nuon/models/app_terraform_state_resource.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_terraform_state_instance import AppTerraformStateInstance - - -T = TypeVar("T", bound="AppTerraformStateResource") - - -@_attrs_define -class AppTerraformStateResource: - """ - Attributes: - instances (Union[Unset, list['AppTerraformStateInstance']]): - mode (Union[Unset, str]): - name (Union[Unset, str]): - provider (Union[Unset, str]): - type_ (Union[Unset, str]): - """ - - instances: Union[Unset, list["AppTerraformStateInstance"]] = UNSET - mode: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - provider: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - instances: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.instances, Unset): - instances = [] - for instances_item_data in self.instances: - instances_item = instances_item_data.to_dict() - instances.append(instances_item) - - mode = self.mode - - name = self.name - - provider = self.provider - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if instances is not UNSET: - field_dict["instances"] = instances - if mode is not UNSET: - field_dict["mode"] = mode - if name is not UNSET: - field_dict["name"] = name - if provider is not UNSET: - field_dict["provider"] = provider - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_terraform_state_instance import AppTerraformStateInstance - - d = dict(src_dict) - instances = [] - _instances = d.pop("instances", UNSET) - for instances_item_data in _instances or []: - instances_item = AppTerraformStateInstance.from_dict(instances_item_data) - - instances.append(instances_item) - - mode = d.pop("mode", UNSET) - - name = d.pop("name", UNSET) - - provider = d.pop("provider", UNSET) - - type_ = d.pop("type", UNSET) - - app_terraform_state_resource = cls( - instances=instances, - mode=mode, - name=name, - provider=provider, - type_=type_, - ) - - app_terraform_state_resource.additional_properties = d - return app_terraform_state_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/nuon/models/app_terraform_workspace.py b/nuon/models/app_terraform_workspace.py deleted file mode 100644 index 8bf33dc7..00000000 --- a/nuon/models/app_terraform_workspace.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppTerraformWorkspace") - - -@_attrs_define -class AppTerraformWorkspace: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_terraform_workspace = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - owner_id=owner_id, - owner_type=owner_type, - updated_at=updated_at, - ) - - app_terraform_workspace.additional_properties = d - return app_terraform_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/nuon/models/app_terraform_workspace_lock.py b/nuon/models/app_terraform_workspace_lock.py deleted file mode 100644 index d670a470..00000000 --- a/nuon/models/app_terraform_workspace_lock.py +++ /dev/null @@ -1,145 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_terraform_lock import AppTerraformLock - - -T = TypeVar("T", bound="AppTerraformWorkspaceLock") - - -@_attrs_define -class AppTerraformWorkspaceLock: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - lock (Union[Unset, AppTerraformLock]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - workspace_id (Union[Unset, str]): Foreign key to TerraformWorkspace with unique constraint to prevent multiple - active locks - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - lock: Union[Unset, "AppTerraformLock"] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workspace_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - lock: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.lock, Unset): - lock = self.lock.to_dict() - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - runner_job_id = self.runner_job_id - - updated_at = self.updated_at - - workspace_id = self.workspace_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if lock is not UNSET: - field_dict["lock"] = lock - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workspace_id is not UNSET: - field_dict["workspace_id"] = workspace_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_terraform_lock import AppTerraformLock - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _lock = d.pop("lock", UNSET) - lock: Union[Unset, AppTerraformLock] - if isinstance(_lock, Unset): - lock = UNSET - else: - lock = AppTerraformLock.from_dict(_lock) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - runner_job_id = d.pop("runner_job_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - workspace_id = d.pop("workspace_id", UNSET) - - app_terraform_workspace_lock = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - lock=lock, - runner_job=runner_job, - runner_job_id=runner_job_id, - updated_at=updated_at, - workspace_id=workspace_id, - ) - - app_terraform_workspace_lock.additional_properties = d - return app_terraform_workspace_lock - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_workspace_state.py b/nuon/models/app_terraform_workspace_state.py deleted file mode 100644 index 743a551f..00000000 --- a/nuon/models/app_terraform_workspace_state.py +++ /dev/null @@ -1,173 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_terraform_workspace import AppTerraformWorkspace - - -T = TypeVar("T", bound="AppTerraformWorkspaceState") - - -@_attrs_define -class AppTerraformWorkspaceState: - """ - Attributes: - contents (Union[Unset, list[int]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - revision (Union[Unset, int]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): - terraform_workspace (Union[Unset, AppTerraformWorkspace]): - terraform_workspace_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - contents: Union[Unset, list[int]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - revision: Union[Unset, int] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET - terraform_workspace_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - contents: Union[Unset, list[int]] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_id = self.org_id - - revision = self.revision - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - runner_job_id = self.runner_job_id - - terraform_workspace: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.terraform_workspace, Unset): - terraform_workspace = self.terraform_workspace.to_dict() - - terraform_workspace_id = self.terraform_workspace_id - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_id is not UNSET: - field_dict["org_id"] = org_id - if revision is not UNSET: - field_dict["revision"] = revision - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if terraform_workspace is not UNSET: - field_dict["terraform_workspace"] = terraform_workspace - if terraform_workspace_id is not UNSET: - field_dict["terraform_workspace_id"] = terraform_workspace_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_terraform_workspace import AppTerraformWorkspace - - d = dict(src_dict) - contents = cast(list[int], d.pop("contents", UNSET)) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_id = d.pop("org_id", UNSET) - - revision = d.pop("revision", UNSET) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - runner_job_id = d.pop("runner_job_id", UNSET) - - _terraform_workspace = d.pop("terraform_workspace", UNSET) - terraform_workspace: Union[Unset, AppTerraformWorkspace] - if isinstance(_terraform_workspace, Unset): - terraform_workspace = UNSET - else: - terraform_workspace = AppTerraformWorkspace.from_dict(_terraform_workspace) - - terraform_workspace_id = d.pop("terraform_workspace_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_terraform_workspace_state = cls( - contents=contents, - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_id=org_id, - revision=revision, - runner_job=runner_job, - runner_job_id=runner_job_id, - terraform_workspace=terraform_workspace, - terraform_workspace_id=terraform_workspace_id, - updated_at=updated_at, - ) - - app_terraform_workspace_state.additional_properties = d - return app_terraform_workspace_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_terraform_workspace_state_json.py b/nuon/models/app_terraform_workspace_state_json.py deleted file mode 100644 index 80a90ec6..00000000 --- a/nuon/models/app_terraform_workspace_state_json.py +++ /dev/null @@ -1,138 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job import AppRunnerJob - - -T = TypeVar("T", bound="AppTerraformWorkspaceStateJSON") - - -@_attrs_define -class AppTerraformWorkspaceStateJSON: - """ - Attributes: - contents (Union[Unset, list[int]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - workspace_id (Union[Unset, str]): Foreign key to TerraformWorkspace with unique constraint to prevent - conflicting states for a workspace - """ - - contents: Union[Unset, list[int]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workspace_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - contents: Union[Unset, list[int]] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - runner_job_id = self.runner_job_id - - updated_at = self.updated_at - - workspace_id = self.workspace_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if runner_job is not UNSET: - field_dict["runner_job"] = runner_job - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workspace_id is not UNSET: - field_dict["workspace_id"] = workspace_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job import AppRunnerJob - - d = dict(src_dict) - contents = cast(list[int], d.pop("contents", UNSET)) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - runner_job_id = d.pop("runner_job_id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - workspace_id = d.pop("workspace_id", UNSET) - - app_terraform_workspace_state_json = cls( - contents=contents, - created_at=created_at, - created_by_id=created_by_id, - id=id, - runner_job=runner_job, - runner_job_id=runner_job_id, - updated_at=updated_at, - workspace_id=workspace_id, - ) - - app_terraform_workspace_state_json.additional_properties = d - return app_terraform_workspace_state_json - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_vcs_connection.py b/nuon/models/app_vcs_connection.py deleted file mode 100644 index 1366f90c..00000000 --- a/nuon/models/app_vcs_connection.py +++ /dev/null @@ -1,120 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_vcs_connection_commit import AppVCSConnectionCommit - - -T = TypeVar("T", bound="AppVCSConnection") - - -@_attrs_define -class AppVCSConnection: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - github_install_id (Union[Unset, str]): - id (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection_commit (Union[Unset, list['AppVCSConnectionCommit']]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - github_install_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_commit: Union[Unset, list["AppVCSConnectionCommit"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - github_install_id = self.github_install_id - - id = self.id - - updated_at = self.updated_at - - vcs_connection_commit: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.vcs_connection_commit, Unset): - vcs_connection_commit = [] - for vcs_connection_commit_item_data in self.vcs_connection_commit: - vcs_connection_commit_item = vcs_connection_commit_item_data.to_dict() - vcs_connection_commit.append(vcs_connection_commit_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if github_install_id is not UNSET: - field_dict["github_install_id"] = github_install_id - if id is not UNSET: - field_dict["id"] = id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vcs_connection_commit is not UNSET: - field_dict["vcs_connection_commit"] = vcs_connection_commit - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_vcs_connection_commit import AppVCSConnectionCommit - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - github_install_id = d.pop("github_install_id", UNSET) - - id = d.pop("id", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - vcs_connection_commit = [] - _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) - for vcs_connection_commit_item_data in _vcs_connection_commit or []: - vcs_connection_commit_item = AppVCSConnectionCommit.from_dict(vcs_connection_commit_item_data) - - vcs_connection_commit.append(vcs_connection_commit_item) - - app_vcs_connection = cls( - created_at=created_at, - created_by_id=created_by_id, - github_install_id=github_install_id, - id=id, - updated_at=updated_at, - vcs_connection_commit=vcs_connection_commit, - ) - - app_vcs_connection.additional_properties = d - return app_vcs_connection - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_vcs_connection_commit.py b/nuon/models/app_vcs_connection_commit.py deleted file mode 100644 index 6c8203a3..00000000 --- a/nuon/models/app_vcs_connection_commit.py +++ /dev/null @@ -1,131 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppVCSConnectionCommit") - - -@_attrs_define -class AppVCSConnectionCommit: - """ - Attributes: - author_email (Union[Unset, str]): - author_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - message (Union[Unset, str]): - sha (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection_id (Union[Unset, str]): - """ - - author_email: Union[Unset, str] = UNSET - author_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - message: Union[Unset, str] = UNSET - sha: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - author_email = self.author_email - - author_name = self.author_name - - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - message = self.message - - sha = self.sha - - updated_at = self.updated_at - - vcs_connection_id = self.vcs_connection_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if author_email is not UNSET: - field_dict["author_email"] = author_email - if author_name is not UNSET: - field_dict["author_name"] = author_name - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if message is not UNSET: - field_dict["message"] = message - if sha is not UNSET: - field_dict["sha"] = sha - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if vcs_connection_id is not UNSET: - field_dict["vcs_connection_id"] = vcs_connection_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - author_email = d.pop("author_email", UNSET) - - author_name = d.pop("author_name", UNSET) - - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - message = d.pop("message", UNSET) - - sha = d.pop("sha", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - vcs_connection_id = d.pop("vcs_connection_id", UNSET) - - app_vcs_connection_commit = cls( - author_email=author_email, - author_name=author_name, - created_at=created_at, - created_by_id=created_by_id, - id=id, - message=message, - sha=sha, - updated_at=updated_at, - vcs_connection_id=vcs_connection_id, - ) - - app_vcs_connection_commit.additional_properties = d - return app_vcs_connection_commit - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_waitlist.py b/nuon/models/app_waitlist.py deleted file mode 100644 index 45356a2c..00000000 --- a/nuon/models/app_waitlist.py +++ /dev/null @@ -1,95 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppWaitlist") - - -@_attrs_define -class AppWaitlist: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_name (Union[Unset, str]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_name: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - org_name = self.org_name - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if org_name is not UNSET: - field_dict["org_name"] = org_name - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - org_name = d.pop("org_name", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - app_waitlist = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - org_name=org_name, - updated_at=updated_at, - ) - - app_waitlist.additional_properties = d - return app_waitlist - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow.py b/nuon/models/app_workflow.py deleted file mode 100644 index a04ecf71..00000000 --- a/nuon/models/app_workflow.py +++ /dev/null @@ -1,371 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_approval_option import AppInstallApprovalOption -from ..models.app_step_error_behavior import AppStepErrorBehavior -from ..models.app_workflow_type import AppWorkflowType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - from ..models.app_install_deploy import AppInstallDeploy - from ..models.app_install_sandbox_run import AppInstallSandboxRun - from ..models.app_workflow_links import AppWorkflowLinks - from ..models.app_workflow_metadata import AppWorkflowMetadata - from ..models.app_workflow_step import AppWorkflowStep - - -T = TypeVar("T", bound="AppWorkflow") - - -@_attrs_define -class AppWorkflow: - """ - Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - execution_time (Union[Unset, int]): - finished (Union[Unset, bool]): - finished_at (Union[Unset, str]): - id (Union[Unset, str]): - install_action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): - links (Union[Unset, AppWorkflowLinks]): - metadata (Union[Unset, AppWorkflowMetadata]): - name (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - plan_only (Union[Unset, bool]): - started_at (Union[Unset, str]): - status (Union[Unset, AppCompositeStatus]): - step_error_behavior (Union[Unset, AppStepErrorBehavior]): - steps (Union[Unset, list['AppWorkflowStep']]): steps represent each piece of the workflow - type_ (Union[Unset, AppWorkflowType]): - updated_at (Union[Unset, str]): - """ - - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_time: Union[Unset, int] = UNSET - finished: Union[Unset, bool] = UNSET - finished_at: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET - links: Union[Unset, "AppWorkflowLinks"] = UNSET - metadata: Union[Unset, "AppWorkflowMetadata"] = UNSET - name: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET - started_at: Union[Unset, str] = UNSET - status: Union[Unset, "AppCompositeStatus"] = UNSET - step_error_behavior: Union[Unset, AppStepErrorBehavior] = UNSET - steps: Union[Unset, list["AppWorkflowStep"]] = UNSET - type_: Union[Unset, AppWorkflowType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_option: Union[Unset, str] = UNSET - if not isinstance(self.approval_option, Unset): - approval_option = self.approval_option.value - - created_at = self.created_at - - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_by_id = self.created_by_id - - execution_time = self.execution_time - - finished = self.finished - - finished_at = self.finished_at - - id = self.id - - install_action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_action_workflow_runs, Unset): - install_action_workflow_runs = [] - for install_action_workflow_runs_item_data in self.install_action_workflow_runs: - install_action_workflow_runs_item = install_action_workflow_runs_item_data.to_dict() - install_action_workflow_runs.append(install_action_workflow_runs_item) - - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_deploys, Unset): - install_deploys = [] - for install_deploys_item_data in self.install_deploys: - install_deploys_item = install_deploys_item_data.to_dict() - install_deploys.append(install_deploys_item) - - install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.install_sandbox_runs, Unset): - install_sandbox_runs = [] - for install_sandbox_runs_item_data in self.install_sandbox_runs: - install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() - install_sandbox_runs.append(install_sandbox_runs_item) - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - name = self.name - - owner_id = self.owner_id - - owner_type = self.owner_type - - plan_only = self.plan_only - - started_at = self.started_at - - status: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status, Unset): - status = self.status.to_dict() - - step_error_behavior: Union[Unset, str] = UNSET - if not isinstance(self.step_error_behavior, Unset): - step_error_behavior = self.step_error_behavior.value - - steps: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.steps, Unset): - steps = [] - for steps_item_data in self.steps: - steps_item = steps_item_data.to_dict() - steps.append(steps_item) - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if approval_option is not UNSET: - field_dict["approval_option"] = approval_option - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by is not UNSET: - field_dict["created_by"] = created_by - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if execution_time is not UNSET: - field_dict["execution_time"] = execution_time - if finished is not UNSET: - field_dict["finished"] = finished - if finished_at is not UNSET: - field_dict["finished_at"] = finished_at - if id is not UNSET: - field_dict["id"] = id - if install_action_workflow_runs is not UNSET: - field_dict["install_action_workflow_runs"] = install_action_workflow_runs - if install_deploys is not UNSET: - field_dict["install_deploys"] = install_deploys - if install_sandbox_runs is not UNSET: - field_dict["install_sandbox_runs"] = install_sandbox_runs - if links is not UNSET: - field_dict["links"] = links - if metadata is not UNSET: - field_dict["metadata"] = metadata - if name is not UNSET: - field_dict["name"] = name - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if step_error_behavior is not UNSET: - field_dict["step_error_behavior"] = step_error_behavior - if steps is not UNSET: - field_dict["steps"] = steps - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun - from ..models.app_install_deploy import AppInstallDeploy - from ..models.app_install_sandbox_run import AppInstallSandboxRun - from ..models.app_workflow_links import AppWorkflowLinks - from ..models.app_workflow_metadata import AppWorkflowMetadata - from ..models.app_workflow_step import AppWorkflowStep - - d = dict(src_dict) - _approval_option = d.pop("approval_option", UNSET) - approval_option: Union[Unset, AppInstallApprovalOption] - if isinstance(_approval_option, Unset): - approval_option = UNSET - else: - approval_option = AppInstallApprovalOption(_approval_option) - - created_at = d.pop("created_at", UNSET) - - _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_by_id = d.pop("created_by_id", UNSET) - - execution_time = d.pop("execution_time", UNSET) - - finished = d.pop("finished", UNSET) - - finished_at = d.pop("finished_at", UNSET) - - id = d.pop("id", UNSET) - - install_action_workflow_runs = [] - _install_action_workflow_runs = d.pop("install_action_workflow_runs", UNSET) - for install_action_workflow_runs_item_data in _install_action_workflow_runs or []: - install_action_workflow_runs_item = AppInstallActionWorkflowRun.from_dict( - install_action_workflow_runs_item_data - ) - - install_action_workflow_runs.append(install_action_workflow_runs_item) - - install_deploys = [] - _install_deploys = d.pop("install_deploys", UNSET) - for install_deploys_item_data in _install_deploys or []: - install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) - - install_deploys.append(install_deploys_item) - - install_sandbox_runs = [] - _install_sandbox_runs = d.pop("install_sandbox_runs", UNSET) - for install_sandbox_runs_item_data in _install_sandbox_runs or []: - install_sandbox_runs_item = AppInstallSandboxRun.from_dict(install_sandbox_runs_item_data) - - install_sandbox_runs.append(install_sandbox_runs_item) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppWorkflowLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppWorkflowLinks.from_dict(_links) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppWorkflowMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppWorkflowMetadata.from_dict(_metadata) - - name = d.pop("name", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - plan_only = d.pop("plan_only", UNSET) - - started_at = d.pop("started_at", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppCompositeStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppCompositeStatus.from_dict(_status) - - _step_error_behavior = d.pop("step_error_behavior", UNSET) - step_error_behavior: Union[Unset, AppStepErrorBehavior] - if isinstance(_step_error_behavior, Unset): - step_error_behavior = UNSET - else: - step_error_behavior = AppStepErrorBehavior(_step_error_behavior) - - steps = [] - _steps = d.pop("steps", UNSET) - for steps_item_data in _steps or []: - steps_item = AppWorkflowStep.from_dict(steps_item_data) - - steps.append(steps_item) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppWorkflowType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppWorkflowType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_workflow = cls( - approval_option=approval_option, - created_at=created_at, - created_by=created_by, - created_by_id=created_by_id, - execution_time=execution_time, - finished=finished, - finished_at=finished_at, - id=id, - install_action_workflow_runs=install_action_workflow_runs, - install_deploys=install_deploys, - install_sandbox_runs=install_sandbox_runs, - links=links, - metadata=metadata, - name=name, - owner_id=owner_id, - owner_type=owner_type, - plan_only=plan_only, - started_at=started_at, - status=status, - step_error_behavior=step_error_behavior, - steps=steps, - type_=type_, - updated_at=updated_at, - ) - - app_workflow.additional_properties = d - return app_workflow - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_links.py b/nuon/models/app_workflow_links.py deleted file mode 100644 index 284b493f..00000000 --- a/nuon/models/app_workflow_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppWorkflowLinks") - - -@_attrs_define -class AppWorkflowLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_workflow_links = cls() - - app_workflow_links.additional_properties = d - return app_workflow_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_metadata.py b/nuon/models/app_workflow_metadata.py deleted file mode 100644 index 07b3e9e4..00000000 --- a/nuon/models/app_workflow_metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppWorkflowMetadata") - - -@_attrs_define -class AppWorkflowMetadata: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_workflow_metadata = cls() - - app_workflow_metadata.additional_properties = d - return app_workflow_metadata - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_step.py b/nuon/models/app_workflow_step.py deleted file mode 100644 index ca20c92f..00000000 --- a/nuon/models/app_workflow_step.py +++ /dev/null @@ -1,378 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_workflow_step_execution_type import AppWorkflowStepExecutionType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_account import AppAccount - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_workflow_step_approval import AppWorkflowStepApproval - from ..models.app_workflow_step_links import AppWorkflowStepLinks - from ..models.app_workflow_step_metadata import AppWorkflowStepMetadata - from ..models.app_workflow_step_policy_validation import AppWorkflowStepPolicyValidation - - -T = TypeVar("T", bound="AppWorkflowStep") - - -@_attrs_define -class AppWorkflowStep: - """ - Attributes: - approval (Union[Unset, AppWorkflowStepApproval]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - execution_time (Union[Unset, int]): - execution_type (Union[Unset, AppWorkflowStepExecutionType]): - finished (Union[Unset, bool]): - finished_at (Union[Unset, str]): - group_idx (Union[Unset, int]): to group steps which belong to same logical group, eg, plan/apply - group_retry_idx (Union[Unset, int]): counter for every retry attempted on a group - id (Union[Unset, str]): - idx (Union[Unset, int]): - install_workflow_id (Union[Unset, str]): DEPRECATED: this is the install workflow ID, which is now the workflow - ID. - links (Union[Unset, AppWorkflowStepLinks]): - metadata (Union[Unset, AppWorkflowStepMetadata]): - name (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - policy_validation (Union[Unset, AppWorkflowStepPolicyValidation]): - retried (Union[Unset, bool]): - retryable (Union[Unset, bool]): - skippable (Union[Unset, bool]): - started_at (Union[Unset, str]): - status (Union[Unset, AppCompositeStatus]): - step_target_id (Union[Unset, str]): the following fields are set _once_ a step is in flight, and are - orchestrated via the step's signal. - - this is a polymorphic gorm relationship to one of the following objects: - - install_cloudformation_stack - install_sandbox_run - install_runner_update - install_deploy - install_action_workflow_run (can be many of these) - step_target_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflow_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery - """ - - approval: Union[Unset, "AppWorkflowStepApproval"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_time: Union[Unset, int] = UNSET - execution_type: Union[Unset, AppWorkflowStepExecutionType] = UNSET - finished: Union[Unset, bool] = UNSET - finished_at: Union[Unset, str] = UNSET - group_idx: Union[Unset, int] = UNSET - group_retry_idx: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - idx: Union[Unset, int] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - links: Union[Unset, "AppWorkflowStepLinks"] = UNSET - metadata: Union[Unset, "AppWorkflowStepMetadata"] = UNSET - name: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - policy_validation: Union[Unset, "AppWorkflowStepPolicyValidation"] = UNSET - retried: Union[Unset, bool] = UNSET - retryable: Union[Unset, bool] = UNSET - skippable: Union[Unset, bool] = UNSET - started_at: Union[Unset, str] = UNSET - status: Union[Unset, "AppCompositeStatus"] = UNSET - step_target_id: Union[Unset, str] = UNSET - step_target_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.approval, Unset): - approval = self.approval.to_dict() - - created_at = self.created_at - - created_by: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.created_by, Unset): - created_by = self.created_by.to_dict() - - created_by_id = self.created_by_id - - execution_time = self.execution_time - - execution_type: Union[Unset, str] = UNSET - if not isinstance(self.execution_type, Unset): - execution_type = self.execution_type.value - - finished = self.finished - - finished_at = self.finished_at - - group_idx = self.group_idx - - group_retry_idx = self.group_retry_idx - - id = self.id - - idx = self.idx - - install_workflow_id = self.install_workflow_id - - links: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - name = self.name - - owner_id = self.owner_id - - owner_type = self.owner_type - - policy_validation: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.policy_validation, Unset): - policy_validation = self.policy_validation.to_dict() - - retried = self.retried - - retryable = self.retryable - - skippable = self.skippable - - started_at = self.started_at - - status: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status, Unset): - status = self.status.to_dict() - - step_target_id = self.step_target_id - - step_target_type = self.step_target_type - - updated_at = self.updated_at - - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if approval is not UNSET: - field_dict["approval"] = approval - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by is not UNSET: - field_dict["created_by"] = created_by - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if execution_time is not UNSET: - field_dict["execution_time"] = execution_time - if execution_type is not UNSET: - field_dict["execution_type"] = execution_type - if finished is not UNSET: - field_dict["finished"] = finished - if finished_at is not UNSET: - field_dict["finished_at"] = finished_at - if group_idx is not UNSET: - field_dict["group_idx"] = group_idx - if group_retry_idx is not UNSET: - field_dict["group_retry_idx"] = group_retry_idx - if id is not UNSET: - field_dict["id"] = id - if idx is not UNSET: - field_dict["idx"] = idx - if install_workflow_id is not UNSET: - field_dict["install_workflow_id"] = install_workflow_id - if links is not UNSET: - field_dict["links"] = links - if metadata is not UNSET: - field_dict["metadata"] = metadata - if name is not UNSET: - field_dict["name"] = name - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if policy_validation is not UNSET: - field_dict["policy_validation"] = policy_validation - if retried is not UNSET: - field_dict["retried"] = retried - if retryable is not UNSET: - field_dict["retryable"] = retryable - if skippable is not UNSET: - field_dict["skippable"] = skippable - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if step_target_id is not UNSET: - field_dict["step_target_id"] = step_target_id - if step_target_type is not UNSET: - field_dict["step_target_type"] = step_target_type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_account import AppAccount - from ..models.app_composite_status import AppCompositeStatus - from ..models.app_workflow_step_approval import AppWorkflowStepApproval - from ..models.app_workflow_step_links import AppWorkflowStepLinks - from ..models.app_workflow_step_metadata import AppWorkflowStepMetadata - from ..models.app_workflow_step_policy_validation import AppWorkflowStepPolicyValidation - - d = dict(src_dict) - _approval = d.pop("approval", UNSET) - approval: Union[Unset, AppWorkflowStepApproval] - if isinstance(_approval, Unset): - approval = UNSET - else: - approval = AppWorkflowStepApproval.from_dict(_approval) - - created_at = d.pop("created_at", UNSET) - - _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] - if isinstance(_created_by, Unset): - created_by = UNSET - else: - created_by = AppAccount.from_dict(_created_by) - - created_by_id = d.pop("created_by_id", UNSET) - - execution_time = d.pop("execution_time", UNSET) - - _execution_type = d.pop("execution_type", UNSET) - execution_type: Union[Unset, AppWorkflowStepExecutionType] - if isinstance(_execution_type, Unset): - execution_type = UNSET - else: - execution_type = AppWorkflowStepExecutionType(_execution_type) - - finished = d.pop("finished", UNSET) - - finished_at = d.pop("finished_at", UNSET) - - group_idx = d.pop("group_idx", UNSET) - - group_retry_idx = d.pop("group_retry_idx", UNSET) - - id = d.pop("id", UNSET) - - idx = d.pop("idx", UNSET) - - install_workflow_id = d.pop("install_workflow_id", UNSET) - - _links = d.pop("links", UNSET) - links: Union[Unset, AppWorkflowStepLinks] - if isinstance(_links, Unset): - links = UNSET - else: - links = AppWorkflowStepLinks.from_dict(_links) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppWorkflowStepMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppWorkflowStepMetadata.from_dict(_metadata) - - name = d.pop("name", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - _policy_validation = d.pop("policy_validation", UNSET) - policy_validation: Union[Unset, AppWorkflowStepPolicyValidation] - if isinstance(_policy_validation, Unset): - policy_validation = UNSET - else: - policy_validation = AppWorkflowStepPolicyValidation.from_dict(_policy_validation) - - retried = d.pop("retried", UNSET) - - retryable = d.pop("retryable", UNSET) - - skippable = d.pop("skippable", UNSET) - - started_at = d.pop("started_at", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppCompositeStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppCompositeStatus.from_dict(_status) - - step_target_id = d.pop("step_target_id", UNSET) - - step_target_type = d.pop("step_target_type", UNSET) - - updated_at = d.pop("updated_at", UNSET) - - workflow_id = d.pop("workflow_id", UNSET) - - app_workflow_step = cls( - approval=approval, - created_at=created_at, - created_by=created_by, - created_by_id=created_by_id, - execution_time=execution_time, - execution_type=execution_type, - finished=finished, - finished_at=finished_at, - group_idx=group_idx, - group_retry_idx=group_retry_idx, - id=id, - idx=idx, - install_workflow_id=install_workflow_id, - links=links, - metadata=metadata, - name=name, - owner_id=owner_id, - owner_type=owner_type, - policy_validation=policy_validation, - retried=retried, - retryable=retryable, - skippable=skippable, - started_at=started_at, - status=status, - step_target_id=step_target_id, - step_target_type=step_target_type, - updated_at=updated_at, - workflow_id=workflow_id, - ) - - app_workflow_step.additional_properties = d - return app_workflow_step - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_approval.py b/nuon/models/app_workflow_step_approval.py deleted file mode 100644 index 53a16161..00000000 --- a/nuon/models/app_workflow_step_approval.py +++ /dev/null @@ -1,222 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_workflow_step_approval_type import AppWorkflowStepApprovalType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow_step import AppWorkflowStep - from ..models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse - - -T = TypeVar("T", bound="AppWorkflowStepApproval") - - -@_attrs_define -class AppWorkflowStepApproval: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_workflow_step (Union[Unset, AppWorkflowStep]): - install_workflow_step_id (Union[Unset, str]): the step that this approval belongs too - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - response (Union[Unset, AppWorkflowStepApprovalResponse]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): the runner job where this approval was created - type_ (Union[Unset, AppWorkflowStepApprovalType]): - updated_at (Union[Unset, str]): - workflow_step (Union[Unset, AppWorkflowStep]): - workflow_step_id (Union[Unset, str]): afterquery - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_workflow_step: Union[Unset, "AppWorkflowStep"] = UNSET - install_workflow_step_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - response: Union[Unset, "AppWorkflowStepApprovalResponse"] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - type_: Union[Unset, AppWorkflowStepApprovalType] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow_step: Union[Unset, "AppWorkflowStep"] = UNSET - workflow_step_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_workflow_step: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_workflow_step, Unset): - install_workflow_step = self.install_workflow_step.to_dict() - - install_workflow_step_id = self.install_workflow_step_id - - owner_id = self.owner_id - - owner_type = self.owner_type - - response: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.response, Unset): - response = self.response.to_dict() - - runner_job: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner_job, Unset): - runner_job = self.runner_job.to_dict() - - runner_job_id = self.runner_job_id - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - workflow_step: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.workflow_step, Unset): - workflow_step = self.workflow_step.to_dict() - - workflow_step_id = self.workflow_step_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_workflow_step is not UNSET: - field_dict["installWorkflowStep"] = install_workflow_step - if install_workflow_step_id is not UNSET: - field_dict["installWorkflowStepID"] = install_workflow_step_id - if owner_id is not UNSET: - field_dict["owner_id"] = owner_id - if owner_type is not UNSET: - field_dict["owner_type"] = owner_type - if response is not UNSET: - field_dict["response"] = response - if runner_job is not UNSET: - field_dict["runnerJob"] = runner_job - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if workflow_step is not UNSET: - field_dict["workflow_step"] = workflow_step - if workflow_step_id is not UNSET: - field_dict["workflow_step_id"] = workflow_step_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_runner_job import AppRunnerJob - from ..models.app_workflow_step import AppWorkflowStep - from ..models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - _install_workflow_step = d.pop("installWorkflowStep", UNSET) - install_workflow_step: Union[Unset, AppWorkflowStep] - if isinstance(_install_workflow_step, Unset): - install_workflow_step = UNSET - else: - install_workflow_step = AppWorkflowStep.from_dict(_install_workflow_step) - - install_workflow_step_id = d.pop("installWorkflowStepID", UNSET) - - owner_id = d.pop("owner_id", UNSET) - - owner_type = d.pop("owner_type", UNSET) - - _response = d.pop("response", UNSET) - response: Union[Unset, AppWorkflowStepApprovalResponse] - if isinstance(_response, Unset): - response = UNSET - else: - response = AppWorkflowStepApprovalResponse.from_dict(_response) - - _runner_job = d.pop("runnerJob", UNSET) - runner_job: Union[Unset, AppRunnerJob] - if isinstance(_runner_job, Unset): - runner_job = UNSET - else: - runner_job = AppRunnerJob.from_dict(_runner_job) - - runner_job_id = d.pop("runner_job_id", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppWorkflowStepApprovalType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppWorkflowStepApprovalType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - _workflow_step = d.pop("workflow_step", UNSET) - workflow_step: Union[Unset, AppWorkflowStep] - if isinstance(_workflow_step, Unset): - workflow_step = UNSET - else: - workflow_step = AppWorkflowStep.from_dict(_workflow_step) - - workflow_step_id = d.pop("workflow_step_id", UNSET) - - app_workflow_step_approval = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_workflow_step=install_workflow_step, - install_workflow_step_id=install_workflow_step_id, - owner_id=owner_id, - owner_type=owner_type, - response=response, - runner_job=runner_job, - runner_job_id=runner_job_id, - type_=type_, - updated_at=updated_at, - workflow_step=workflow_step, - workflow_step_id=workflow_step_id, - ) - - app_workflow_step_approval.additional_properties = d - return app_workflow_step_approval - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_approval_response.py b/nuon/models/app_workflow_step_approval_response.py deleted file mode 100644 index 5716a1b7..00000000 --- a/nuon/models/app_workflow_step_approval_response.py +++ /dev/null @@ -1,121 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_workflow_step_response_type import AppWorkflowStepResponseType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AppWorkflowStepApprovalResponse") - - -@_attrs_define -class AppWorkflowStepApprovalResponse: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_workflow_step_approval_id (Union[Unset, str]): the approval the response belongs to - note (Union[Unset, str]): - type_ (Union[Unset, AppWorkflowStepResponseType]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_workflow_step_approval_id: Union[Unset, str] = UNSET - note: Union[Unset, str] = UNSET - type_: Union[Unset, AppWorkflowStepResponseType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_workflow_step_approval_id = self.install_workflow_step_approval_id - - note = self.note - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_workflow_step_approval_id is not UNSET: - field_dict["install_workflow_step_approval_id"] = install_workflow_step_approval_id - if note is not UNSET: - field_dict["note"] = note - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_workflow_step_approval_id = d.pop("install_workflow_step_approval_id", UNSET) - - note = d.pop("note", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppWorkflowStepResponseType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppWorkflowStepResponseType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_workflow_step_approval_response = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_workflow_step_approval_id=install_workflow_step_approval_id, - note=note, - type_=type_, - updated_at=updated_at, - ) - - app_workflow_step_approval_response.additional_properties = d - return app_workflow_step_approval_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/nuon/models/app_workflow_step_approval_type.py b/nuon/models/app_workflow_step_approval_type.py deleted file mode 100644 index ad5e4d5f..00000000 --- a/nuon/models/app_workflow_step_approval_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppWorkflowStepApprovalType(str, Enum): - APPROVE_ALL = "approve-all" - HELM_APPROVAL = "helm_approval" - KUBERNETES_MANIFEST_APPROVAL = "kubernetes_manifest_approval" - NOOP = "noop" - TERRAFORM_PLAN = "terraform_plan" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_workflow_step_execution_type.py b/nuon/models/app_workflow_step_execution_type.py deleted file mode 100644 index 1b9cfe08..00000000 --- a/nuon/models/app_workflow_step_execution_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppWorkflowStepExecutionType(str, Enum): - APPROVAL = "approval" - HIDDEN = "hidden" - SKIPPED = "skipped" - SYSTEM = "system" - USER = "user" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_workflow_step_links.py b/nuon/models/app_workflow_step_links.py deleted file mode 100644 index 83d1b937..00000000 --- a/nuon/models/app_workflow_step_links.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppWorkflowStepLinks") - - -@_attrs_define -class AppWorkflowStepLinks: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_workflow_step_links = cls() - - app_workflow_step_links.additional_properties = d - return app_workflow_step_links - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_metadata.py b/nuon/models/app_workflow_step_metadata.py deleted file mode 100644 index 4dcdf29d..00000000 --- a/nuon/models/app_workflow_step_metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AppWorkflowStepMetadata") - - -@_attrs_define -class AppWorkflowStepMetadata: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_workflow_step_metadata = cls() - - app_workflow_step_metadata.additional_properties = d - return app_workflow_step_metadata - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_policy_validation.py b/nuon/models/app_workflow_step_policy_validation.py deleted file mode 100644 index 3f3fb12c..00000000 --- a/nuon/models/app_workflow_step_policy_validation.py +++ /dev/null @@ -1,136 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_composite_status import AppCompositeStatus - - -T = TypeVar("T", bound="AppWorkflowStepPolicyValidation") - - -@_attrs_define -class AppWorkflowStepPolicyValidation: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_workflow_step_id (Union[Unset, str]): install workflow step is the install step that this was performed - within - response (Union[Unset, str]): response is the kyverno response - runner_job_id (Union[Unset, str]): runnerJobID is the runner job that this was performed within - status (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - """ - - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_workflow_step_id: Union[Unset, str] = UNSET - response: Union[Unset, str] = UNSET - runner_job_id: Union[Unset, str] = UNSET - status: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_workflow_step_id = self.install_workflow_step_id - - response = self.response - - runner_job_id = self.runner_job_id - - status: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.status, Unset): - status = self.status.to_dict() - - updated_at = self.updated_at - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_workflow_step_id is not UNSET: - field_dict["install_workflow_step_id"] = install_workflow_step_id - if response is not UNSET: - field_dict["response"] = response - if runner_job_id is not UNSET: - field_dict["runner_job_id"] = runner_job_id - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_composite_status import AppCompositeStatus - - d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_workflow_step_id = d.pop("install_workflow_step_id", UNSET) - - response = d.pop("response", UNSET) - - runner_job_id = d.pop("runner_job_id", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppCompositeStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppCompositeStatus.from_dict(_status) - - updated_at = d.pop("updated_at", UNSET) - - app_workflow_step_policy_validation = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_workflow_step_id=install_workflow_step_id, - response=response, - runner_job_id=runner_job_id, - status=status, - updated_at=updated_at, - ) - - app_workflow_step_policy_validation.additional_properties = d - return app_workflow_step_policy_validation - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_response_type.py b/nuon/models/app_workflow_step_response_type.py deleted file mode 100644 index c4b47425..00000000 --- a/nuon/models/app_workflow_step_response_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class AppWorkflowStepResponseType(str, Enum): - APPROVE = "approve" - AUTO_APPROVE = "auto-approve" - DENY = "deny" - RETRY = "retry" - SKIP = "skip" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/app_workflow_type.py b/nuon/models/app_workflow_type.py deleted file mode 100644 index ab95e8cb..00000000 --- a/nuon/models/app_workflow_type.py +++ /dev/null @@ -1,22 +0,0 @@ -from enum import Enum - - -class AppWorkflowType(str, Enum): - ACTION_WORKFLOW_RUN = "action_workflow_run" - APP_BRANCHES_COMPONENT_REPO_UPDATE = "app_branches_component_repo_update" - APP_BRANCHES_CONFIG_REPO_UPDATE = "app_branches_config_repo_update" - APP_BRANCHES_MANUAL_UPDATE = "app_branches_manual_update" - DEPLOY_COMPONENTS = "deploy_components" - DEPROVISION = "deprovision" - DEPROVISION_SANDBOX = "deprovision_sandbox" - INPUT_UPDATE = "input_update" - MANUAL_DEPLOY = "manual_deploy" - PROVISION = "provision" - REPROVISION = "reprovision" - REPROVISION_SANDBOX = "reprovision_sandbox" - SYNC_SECRETS = "sync_secrets" - TEARDOWN_COMPONENT = "teardown_component" - TEARDOWN_COMPONENTS = "teardown_components" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/config_app_policy_type.py b/nuon/models/config_app_policy_type.py deleted file mode 100644 index cd9151fd..00000000 --- a/nuon/models/config_app_policy_type.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class ConfigAppPolicyType(str, Enum): - KUBERNETES_CLUSTER = "kubernetes_cluster" - RUNNER_JOB_ACTION_WORKFLOW = "runner_job_action_workflow" - RUNNER_JOB_HELM_DEPLOY = "runner_job_helm_deploy" - RUNNER_JOB_TERRAFORM_DEPLOY = "runner_job_terraform_deploy" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/get_app_config_template_type.py b/nuon/models/get_app_config_template_type.py deleted file mode 100644 index bee18843..00000000 --- a/nuon/models/get_app_config_template_type.py +++ /dev/null @@ -1,25 +0,0 @@ -from enum import Enum - - -class GetAppConfigTemplateType(str, Enum): - AWS_ECS = "aws-ecs" - AWS_ECS_BYOVPC = "aws-ecs-byovpc" - AWS_EKS = "aws-eks" - AWS_EKS_BYOVPC = "aws-eks-byovpc" - AZURE_AKS = "azure-aks" - CONTAINER_IMAGE = "container-image" - DOCKER_BUILD = "docker-build" - ECR_CONTAINER_IMAGE = "ecr-container-image" - FLAT = "flat" - HELM = "helm" - INPUTS = "inputs" - INSTALLER = "installer" - JOB = "job" - RUNNER = "runner" - SANDBOX = "sandbox" - TERRAFORM = "terraform" - TERRAFORMINFRA = "terraformInfra" - TOP_LEVEL = "top-level" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/get_config_schema_response_200.py b/nuon/models/get_config_schema_response_200.py deleted file mode 100644 index 2f9e583a..00000000 --- a/nuon/models/get_config_schema_response_200.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetConfigSchemaResponse200") - - -@_attrs_define -class GetConfigSchemaResponse200: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - get_config_schema_response_200 = cls() - - get_config_schema_response_200.additional_properties = d - return get_config_schema_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/nuon/models/get_install_component_outputs_response_200.py b/nuon/models/get_install_component_outputs_response_200.py deleted file mode 100644 index 26fa97b9..00000000 --- a/nuon/models/get_install_component_outputs_response_200.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetInstallComponentOutputsResponse200") - - -@_attrs_define -class GetInstallComponentOutputsResponse200: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - get_install_component_outputs_response_200 = cls() - - get_install_component_outputs_response_200.additional_properties = d - return get_install_component_outputs_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/nuon/models/get_terraform_workspace_state_json_resources_response_200.py b/nuon/models/get_terraform_workspace_state_json_resources_response_200.py deleted file mode 100644 index c329e0ea..00000000 --- a/nuon/models/get_terraform_workspace_state_json_resources_response_200.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTerraformWorkspaceStateJSONResourcesResponse200") - - -@_attrs_define -class GetTerraformWorkspaceStateJSONResourcesResponse200: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - get_terraform_workspace_state_json_resources_response_200 = cls() - - get_terraform_workspace_state_json_resources_response_200.additional_properties = d - return get_terraform_workspace_state_json_resources_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/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py b/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py deleted file mode 100644 index 8e4b3e12..00000000 --- a/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTerraformWorkspaceStatesJSONByIDResponse200") - - -@_attrs_define -class GetTerraformWorkspaceStatesJSONByIDResponse200: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - get_terraform_workspace_states_json_by_id_response_200 = cls() - - get_terraform_workspace_states_json_by_id_response_200.additional_properties = d - return get_terraform_workspace_states_json_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/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py deleted file mode 100644 index d49d901e..00000000 --- a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py +++ /dev/null @@ -1,292 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.github_com_powertoolsdev_mono_pkg_types_state_state_components import ( - GithubComPowertoolsdevMonoPkgTypesStateStateComponents, - ) - from ..models.state_actions_state import StateActionsState - from ..models.state_app_state import StateAppState - from ..models.state_cloud_account import StateCloudAccount - from ..models.state_domain_state import StateDomainState - from ..models.state_inputs_state import StateInputsState - from ..models.state_install_stack_state import StateInstallStackState - from ..models.state_install_state import StateInstallState - from ..models.state_org_state import StateOrgState - from ..models.state_runner_state import StateRunnerState - from ..models.state_sandbox_state import StateSandboxState - from ..models.state_secrets_state import StateSecretsState - - -T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgTypesStateState") - - -@_attrs_define -class GithubComPowertoolsdevMonoPkgTypesStateState: - """ - Attributes: - actions (Union[Unset, StateActionsState]): - app (Union[Unset, StateAppState]): - cloud_account (Union[Unset, StateCloudAccount]): - components (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateStateComponents]): - domain (Union[Unset, StateDomainState]): - id (Union[Unset, str]): - inputs (Union[Unset, StateInputsState]): - install (Union[Unset, StateInstallState]): - install_stack (Union[Unset, StateInstallStackState]): - name (Union[Unset, str]): - org (Union[Unset, StateOrgState]): - runner (Union[Unset, StateRunnerState]): - sandbox (Union[Unset, StateSandboxState]): - secrets (Union[Unset, StateSecretsState]): - """ - - actions: Union[Unset, "StateActionsState"] = UNSET - app: Union[Unset, "StateAppState"] = UNSET - cloud_account: Union[Unset, "StateCloudAccount"] = UNSET - components: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateStateComponents"] = UNSET - domain: Union[Unset, "StateDomainState"] = UNSET - id: Union[Unset, str] = UNSET - inputs: Union[Unset, "StateInputsState"] = UNSET - install: Union[Unset, "StateInstallState"] = UNSET - install_stack: Union[Unset, "StateInstallStackState"] = UNSET - name: Union[Unset, str] = UNSET - org: Union[Unset, "StateOrgState"] = UNSET - runner: Union[Unset, "StateRunnerState"] = UNSET - sandbox: Union[Unset, "StateSandboxState"] = UNSET - secrets: Union[Unset, "StateSecretsState"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - actions: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.actions, Unset): - actions = self.actions.to_dict() - - app: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.app, Unset): - app = self.app.to_dict() - - cloud_account: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.cloud_account, Unset): - cloud_account = self.cloud_account.to_dict() - - components: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.components, Unset): - components = self.components.to_dict() - - domain: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.domain, Unset): - domain = self.domain.to_dict() - - id = self.id - - inputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.inputs, Unset): - inputs = self.inputs.to_dict() - - install: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install, Unset): - install = self.install.to_dict() - - install_stack: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_stack, Unset): - install_stack = self.install_stack.to_dict() - - name = self.name - - org: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.org, Unset): - org = self.org.to_dict() - - runner: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.runner, Unset): - runner = self.runner.to_dict() - - sandbox: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.sandbox, Unset): - sandbox = self.sandbox.to_dict() - - secrets: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.secrets, Unset): - secrets = self.secrets.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if actions is not UNSET: - field_dict["actions"] = actions - if app is not UNSET: - field_dict["app"] = app - if cloud_account is not UNSET: - field_dict["cloud_account"] = cloud_account - if components is not UNSET: - field_dict["components"] = components - if domain is not UNSET: - field_dict["domain"] = domain - if id is not UNSET: - field_dict["id"] = id - if inputs is not UNSET: - field_dict["inputs"] = inputs - if install is not UNSET: - field_dict["install"] = install - if install_stack is not UNSET: - field_dict["install_stack"] = install_stack - if name is not UNSET: - field_dict["name"] = name - if org is not UNSET: - field_dict["org"] = org - if runner is not UNSET: - field_dict["runner"] = runner - if sandbox is not UNSET: - field_dict["sandbox"] = sandbox - if secrets is not UNSET: - field_dict["secrets"] = secrets - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_com_powertoolsdev_mono_pkg_types_state_state_components import ( - GithubComPowertoolsdevMonoPkgTypesStateStateComponents, - ) - from ..models.state_actions_state import StateActionsState - from ..models.state_app_state import StateAppState - from ..models.state_cloud_account import StateCloudAccount - from ..models.state_domain_state import StateDomainState - from ..models.state_inputs_state import StateInputsState - from ..models.state_install_stack_state import StateInstallStackState - from ..models.state_install_state import StateInstallState - from ..models.state_org_state import StateOrgState - from ..models.state_runner_state import StateRunnerState - from ..models.state_sandbox_state import StateSandboxState - from ..models.state_secrets_state import StateSecretsState - - d = dict(src_dict) - _actions = d.pop("actions", UNSET) - actions: Union[Unset, StateActionsState] - if isinstance(_actions, Unset): - actions = UNSET - else: - actions = StateActionsState.from_dict(_actions) - - _app = d.pop("app", UNSET) - app: Union[Unset, StateAppState] - if isinstance(_app, Unset): - app = UNSET - else: - app = StateAppState.from_dict(_app) - - _cloud_account = d.pop("cloud_account", UNSET) - cloud_account: Union[Unset, StateCloudAccount] - if isinstance(_cloud_account, Unset): - cloud_account = UNSET - else: - cloud_account = StateCloudAccount.from_dict(_cloud_account) - - _components = d.pop("components", UNSET) - components: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateStateComponents] - if isinstance(_components, Unset): - components = UNSET - else: - components = GithubComPowertoolsdevMonoPkgTypesStateStateComponents.from_dict(_components) - - _domain = d.pop("domain", UNSET) - domain: Union[Unset, StateDomainState] - if isinstance(_domain, Unset): - domain = UNSET - else: - domain = StateDomainState.from_dict(_domain) - - id = d.pop("id", UNSET) - - _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, StateInputsState] - if isinstance(_inputs, Unset): - inputs = UNSET - else: - inputs = StateInputsState.from_dict(_inputs) - - _install = d.pop("install", UNSET) - install: Union[Unset, StateInstallState] - if isinstance(_install, Unset): - install = UNSET - else: - install = StateInstallState.from_dict(_install) - - _install_stack = d.pop("install_stack", UNSET) - install_stack: Union[Unset, StateInstallStackState] - if isinstance(_install_stack, Unset): - install_stack = UNSET - else: - install_stack = StateInstallStackState.from_dict(_install_stack) - - name = d.pop("name", UNSET) - - _org = d.pop("org", UNSET) - org: Union[Unset, StateOrgState] - if isinstance(_org, Unset): - org = UNSET - else: - org = StateOrgState.from_dict(_org) - - _runner = d.pop("runner", UNSET) - runner: Union[Unset, StateRunnerState] - if isinstance(_runner, Unset): - runner = UNSET - else: - runner = StateRunnerState.from_dict(_runner) - - _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, StateSandboxState] - if isinstance(_sandbox, Unset): - sandbox = UNSET - else: - sandbox = StateSandboxState.from_dict(_sandbox) - - _secrets = d.pop("secrets", UNSET) - secrets: Union[Unset, StateSecretsState] - if isinstance(_secrets, Unset): - secrets = UNSET - else: - secrets = StateSecretsState.from_dict(_secrets) - - github_com_powertoolsdev_mono_pkg_types_state_state = cls( - actions=actions, - app=app, - cloud_account=cloud_account, - components=components, - domain=domain, - id=id, - inputs=inputs, - install=install, - install_stack=install_stack, - name=name, - org=org, - runner=runner, - sandbox=sandbox, - secrets=secrets, - ) - - github_com_powertoolsdev_mono_pkg_types_state_state.additional_properties = d - return github_com_powertoolsdev_mono_pkg_types_state_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py deleted file mode 100644 index 92cef8c6..00000000 --- a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgTypesStateStateComponents") - - -@_attrs_define -class GithubComPowertoolsdevMonoPkgTypesStateStateComponents: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - github_com_powertoolsdev_mono_pkg_types_state_state_components = cls() - - github_com_powertoolsdev_mono_pkg_types_state_state_components.additional_properties = d - return github_com_powertoolsdev_mono_pkg_types_state_state_components - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/helpers_create_install_config_params.py b/nuon/models/helpers_create_install_config_params.py deleted file mode 100644 index 90c00ca2..00000000 --- a/nuon/models/helpers_create_install_config_params.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_approval_option import AppInstallApprovalOption -from ..types import UNSET, Unset - -T = TypeVar("T", bound="HelpersCreateInstallConfigParams") - - -@_attrs_define -class HelpersCreateInstallConfigParams: - """ - Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - """ - - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_option: Union[Unset, str] = UNSET - if not isinstance(self.approval_option, Unset): - approval_option = self.approval_option.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if approval_option is not UNSET: - field_dict["approval_option"] = approval_option - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - _approval_option = d.pop("approval_option", UNSET) - approval_option: Union[Unset, AppInstallApprovalOption] - if isinstance(_approval_option, Unset): - approval_option = UNSET - else: - approval_option = AppInstallApprovalOption(_approval_option) - - helpers_create_install_config_params = cls( - approval_option=approval_option, - ) - - helpers_create_install_config_params.additional_properties = d - return helpers_create_install_config_params - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/lock_terraform_workspace_body.py b/nuon/models/lock_terraform_workspace_body.py deleted file mode 100644 index 06826d10..00000000 --- a/nuon/models/lock_terraform_workspace_body.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="LockTerraformWorkspaceBody") - - -@_attrs_define -class LockTerraformWorkspaceBody: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - lock_terraform_workspace_body = cls() - - lock_terraform_workspace_body.additional_properties = d - return lock_terraform_workspace_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/nuon/models/outputs_secret_sync_output.py b/nuon/models/outputs_secret_sync_output.py deleted file mode 100644 index 0cfdb524..00000000 --- a/nuon/models/outputs_secret_sync_output.py +++ /dev/null @@ -1,122 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="OutputsSecretSyncOutput") - - -@_attrs_define -class OutputsSecretSyncOutput: - """ - Attributes: - arn (Union[Unset, str]): - exists (Union[Unset, bool]): - kubernetes_key (Union[Unset, str]): - kubernetes_name (Union[Unset, str]): - kubernetes_namespace (Union[Unset, str]): - length (Union[Unset, int]): - name (Union[Unset, str]): - timestamp (Union[Unset, str]): - """ - - arn: Union[Unset, str] = UNSET - exists: Union[Unset, bool] = UNSET - kubernetes_key: Union[Unset, str] = UNSET - kubernetes_name: Union[Unset, str] = UNSET - kubernetes_namespace: Union[Unset, str] = UNSET - length: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - timestamp: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - arn = self.arn - - exists = self.exists - - kubernetes_key = self.kubernetes_key - - kubernetes_name = self.kubernetes_name - - kubernetes_namespace = self.kubernetes_namespace - - length = self.length - - name = self.name - - timestamp = self.timestamp - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if arn is not UNSET: - field_dict["arn"] = arn - if exists is not UNSET: - field_dict["exists"] = exists - if kubernetes_key is not UNSET: - field_dict["kubernetes_key"] = kubernetes_key - if kubernetes_name is not UNSET: - field_dict["kubernetes_name"] = kubernetes_name - if kubernetes_namespace is not UNSET: - field_dict["kubernetes_namespace"] = kubernetes_namespace - if length is not UNSET: - field_dict["length"] = length - if name is not UNSET: - field_dict["name"] = name - if timestamp is not UNSET: - field_dict["timestamp"] = timestamp - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - arn = d.pop("arn", UNSET) - - exists = d.pop("exists", UNSET) - - kubernetes_key = d.pop("kubernetes_key", UNSET) - - kubernetes_name = d.pop("kubernetes_name", UNSET) - - kubernetes_namespace = d.pop("kubernetes_namespace", UNSET) - - length = d.pop("length", UNSET) - - name = d.pop("name", UNSET) - - timestamp = d.pop("timestamp", UNSET) - - outputs_secret_sync_output = cls( - arn=arn, - exists=exists, - kubernetes_key=kubernetes_key, - kubernetes_name=kubernetes_name, - kubernetes_namespace=kubernetes_namespace, - length=length, - name=name, - timestamp=timestamp, - ) - - outputs_secret_sync_output.additional_properties = d - return outputs_secret_sync_output - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/permissions_permission.py b/nuon/models/permissions_permission.py deleted file mode 100644 index bf02f591..00000000 --- a/nuon/models/permissions_permission.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class PermissionsPermission(str, Enum): - ALL = "all" - CREATE = "create" - DELETE = "delete" - READ = "read" - UNKNOWN = "unknown" - UPDATE = "update" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/permissions_set.py b/nuon/models/permissions_set.py deleted file mode 100644 index d8db396a..00000000 --- a/nuon/models/permissions_set.py +++ /dev/null @@ -1,53 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.permissions_permission import PermissionsPermission - -T = TypeVar("T", bound="PermissionsSet") - - -@_attrs_define -class PermissionsSet: - """ """ - - additional_properties: dict[str, PermissionsPermission] = _attrs_field(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(): - field_dict[prop_name] = prop.value - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - permissions_set = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = PermissionsPermission(prop_dict) - - additional_properties[prop_name] = additional_property - - permissions_set.additional_properties = additional_properties - return permissions_set - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> PermissionsPermission: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: PermissionsPermission) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/refs_ref.py b/nuon/models/refs_ref.py deleted file mode 100644 index 280a6759..00000000 --- a/nuon/models/refs_ref.py +++ /dev/null @@ -1,94 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.refs_ref_type import RefsRefType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="RefsRef") - - -@_attrs_define -class RefsRef: - """ - Attributes: - input_ (Union[Unset, str]): - name (Union[Unset, str]): - type_ (Union[Unset, RefsRefType]): - value (Union[Unset, str]): - """ - - input_: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - type_: Union[Unset, RefsRefType] = UNSET - value: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - input_ = self.input_ - - name = self.name - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if input_ is not UNSET: - field_dict["input"] = input_ - if name is not UNSET: - field_dict["name"] = name - if type_ is not UNSET: - field_dict["type"] = type_ - if value is not UNSET: - field_dict["value"] = value - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - input_ = d.pop("input", UNSET) - - name = d.pop("name", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, RefsRefType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = RefsRefType(_type_) - - value = d.pop("value", UNSET) - - refs_ref = cls( - input_=input_, - name=name, - type_=type_, - value=value, - ) - - refs_ref.additional_properties = d - return refs_ref - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/refs_ref_type.py b/nuon/models/refs_ref_type.py deleted file mode 100644 index 1c10602e..00000000 --- a/nuon/models/refs_ref_type.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class RefsRefType(str, Enum): - ACTIONS = "actions" - COMPONENT = "component" - INPUTS = "inputs" - INSTALL_INPUTS = "install_inputs" - INSTALL_STACK = "install_stack" - SANDBOX = "sandbox" - SECRETS = "secrets" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/service_app_awsiam_policy_config.py b/nuon/models/service_app_awsiam_policy_config.py deleted file mode 100644 index 1fdb7507..00000000 --- a/nuon/models/service_app_awsiam_policy_config.py +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceAppAWSIAMPolicyConfig") - - -@_attrs_define -class ServiceAppAWSIAMPolicyConfig: - """ - Attributes: - contents (Union[Unset, str]): - managed_policy_name (Union[Unset, str]): - name (Union[Unset, str]): - """ - - contents: Union[Unset, str] = UNSET - managed_policy_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - contents = self.contents - - managed_policy_name = self.managed_policy_name - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if managed_policy_name is not UNSET: - field_dict["managed_policy_name"] = managed_policy_name - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - contents = d.pop("contents", UNSET) - - managed_policy_name = d.pop("managed_policy_name", UNSET) - - name = d.pop("name", UNSET) - - service_app_awsiam_policy_config = cls( - contents=contents, - managed_policy_name=managed_policy_name, - name=name, - ) - - service_app_awsiam_policy_config.additional_properties = d - return service_app_awsiam_policy_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_app_awsiam_role_config.py b/nuon/models/service_app_awsiam_role_config.py deleted file mode 100644 index 0dca9dc7..00000000 --- a/nuon/models/service_app_awsiam_role_config.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig - - -T = TypeVar("T", bound="ServiceAppAWSIAMRoleConfig") - - -@_attrs_define -class ServiceAppAWSIAMRoleConfig: - """ - Attributes: - description (str): - display_name (str): - name (str): - permissions_boundary (Union[Unset, str]): - policies (Union[Unset, list['ServiceAppAWSIAMPolicyConfig']]): - """ - - description: str - display_name: str - name: str - permissions_boundary: Union[Unset, str] = UNSET - policies: Union[Unset, list["ServiceAppAWSIAMPolicyConfig"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - display_name = self.display_name - - name = self.name - - permissions_boundary = self.permissions_boundary - - policies: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.policies, Unset): - policies = [] - for policies_item_data in self.policies: - policies_item = policies_item_data.to_dict() - policies.append(policies_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "description": description, - "display_name": display_name, - "name": name, - } - ) - if permissions_boundary is not UNSET: - field_dict["permissions_boundary"] = permissions_boundary - if policies is not UNSET: - field_dict["policies"] = policies - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig - - d = dict(src_dict) - description = d.pop("description") - - display_name = d.pop("display_name") - - name = d.pop("name") - - permissions_boundary = d.pop("permissions_boundary", UNSET) - - policies = [] - _policies = d.pop("policies", UNSET) - for policies_item_data in _policies or []: - policies_item = ServiceAppAWSIAMPolicyConfig.from_dict(policies_item_data) - - policies.append(policies_item) - - service_app_awsiam_role_config = cls( - description=description, - display_name=display_name, - name=name, - permissions_boundary=permissions_boundary, - policies=policies, - ) - - service_app_awsiam_role_config.additional_properties = d - return service_app_awsiam_role_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_app_config_template.py b/nuon/models/service_app_config_template.py deleted file mode 100644 index b93d3d0e..00000000 --- a/nuon/models/service_app_config_template.py +++ /dev/null @@ -1,102 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_app_config_version import AppAppConfigVersion -from ..models.service_app_config_template_type import ServiceAppConfigTemplateType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceAppConfigTemplate") - - -@_attrs_define -class ServiceAppConfigTemplate: - """ - Attributes: - content (Union[Unset, str]): - filename (Union[Unset, str]): - format_ (Union[Unset, AppAppConfigVersion]): - type_ (Union[Unset, ServiceAppConfigTemplateType]): - """ - - content: Union[Unset, str] = UNSET - filename: Union[Unset, str] = UNSET - format_: Union[Unset, AppAppConfigVersion] = UNSET - type_: Union[Unset, ServiceAppConfigTemplateType] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - content = self.content - - filename = self.filename - - format_: Union[Unset, str] = UNSET - if not isinstance(self.format_, Unset): - format_ = self.format_.value - - 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 content is not UNSET: - field_dict["content"] = content - if filename is not UNSET: - field_dict["filename"] = filename - if format_ is not UNSET: - field_dict["format"] = format_ - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - content = d.pop("content", UNSET) - - filename = d.pop("filename", UNSET) - - _format_ = d.pop("format", UNSET) - format_: Union[Unset, AppAppConfigVersion] - if isinstance(_format_, Unset): - format_ = UNSET - else: - format_ = AppAppConfigVersion(_format_) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, ServiceAppConfigTemplateType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = ServiceAppConfigTemplateType(_type_) - - service_app_config_template = cls( - content=content, - filename=filename, - format_=format_, - type_=type_, - ) - - service_app_config_template.additional_properties = d - return service_app_config_template - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_app_config_template_type.py b/nuon/models/service_app_config_template_type.py deleted file mode 100644 index 6baed784..00000000 --- a/nuon/models/service_app_config_template_type.py +++ /dev/null @@ -1,25 +0,0 @@ -from enum import Enum - - -class ServiceAppConfigTemplateType(str, Enum): - AWS_ECS = "aws-ecs" - AWS_ECS_BYOVPC = "aws-ecs-byovpc" - AWS_EKS = "aws-eks" - AWS_EKS_BYOVPC = "aws-eks-byovpc" - AZURE_AKS = "azure-aks" - CONTAINER_IMAGE = "container-image" - DOCKER_BUILD = "docker-build" - ECR_CONTAINER_IMAGE = "ecr-container-image" - FLAT = "flat" - HELM = "helm" - INPUTS = "inputs" - INSTALLER = "installer" - JOB = "job" - RUNNER = "runner" - SANDBOX = "sandbox" - TERRAFORM = "terraform" - TERRAFORMINFRA = "terraformInfra" - TOP_LEVEL = "top-level" - - def __str__(self) -> str: - return str(self.value) diff --git a/nuon/models/service_app_group_request.py b/nuon/models/service_app_group_request.py deleted file mode 100644 index e2937949..00000000 --- a/nuon/models/service_app_group_request.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceAppGroupRequest") - - -@_attrs_define -class ServiceAppGroupRequest: - """ - Attributes: - description (str): - display_name (str): - index (int): - """ - - description: str - display_name: str - index: int - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - display_name = self.display_name - - index = self.index - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "description": description, - "display_name": display_name, - "index": index, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - description = d.pop("description") - - display_name = d.pop("display_name") - - index = d.pop("index") - - service_app_group_request = cls( - description=description, - display_name=display_name, - index=index, - ) - - service_app_group_request.additional_properties = d - return service_app_group_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_app_input_request.py b/nuon/models/service_app_input_request.py deleted file mode 100644 index e474c10c..00000000 --- a/nuon/models/service_app_input_request.py +++ /dev/null @@ -1,130 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceAppInputRequest") - - -@_attrs_define -class ServiceAppInputRequest: - """ - Attributes: - description (str): - display_name (str): - group (str): - index (int): - default (Union[Unset, str]): - internal (Union[Unset, bool]): New, optional fields - required (Union[Unset, bool]): - sensitive (Union[Unset, bool]): - type_ (Union[Unset, str]): - """ - - description: str - display_name: str - group: str - index: int - default: Union[Unset, str] = UNSET - internal: Union[Unset, bool] = UNSET - required: Union[Unset, bool] = UNSET - sensitive: Union[Unset, bool] = UNSET - type_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - display_name = self.display_name - - group = self.group - - index = self.index - - default = self.default - - internal = self.internal - - required = self.required - - sensitive = self.sensitive - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "description": description, - "display_name": display_name, - "group": group, - "index": index, - } - ) - if default is not UNSET: - field_dict["default"] = default - if internal is not UNSET: - field_dict["internal"] = internal - if required is not UNSET: - field_dict["required"] = required - if sensitive is not UNSET: - field_dict["sensitive"] = sensitive - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - description = d.pop("description") - - display_name = d.pop("display_name") - - group = d.pop("group") - - index = d.pop("index") - - default = d.pop("default", UNSET) - - internal = d.pop("internal", UNSET) - - required = d.pop("required", UNSET) - - sensitive = d.pop("sensitive", UNSET) - - type_ = d.pop("type", UNSET) - - service_app_input_request = cls( - description=description, - display_name=display_name, - group=group, - index=index, - default=default, - internal=internal, - required=required, - sensitive=sensitive, - type_=type_, - ) - - service_app_input_request.additional_properties = d - return service_app_input_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_app_policy_config.py b/nuon/models/service_app_policy_config.py deleted file mode 100644 index af424da1..00000000 --- a/nuon/models/service_app_policy_config.py +++ /dev/null @@ -1,69 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.config_app_policy_type import ConfigAppPolicyType - -T = TypeVar("T", bound="ServiceAppPolicyConfig") - - -@_attrs_define -class ServiceAppPolicyConfig: - """ - Attributes: - contents (str): - type_ (ConfigAppPolicyType): - """ - - contents: str - type_: ConfigAppPolicyType - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - contents = self.contents - - type_ = self.type_.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "contents": contents, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - contents = d.pop("contents") - - type_ = ConfigAppPolicyType(d.pop("type")) - - service_app_policy_config = cls( - contents=contents, - type_=type_, - ) - - service_app_policy_config.additional_properties = d - return service_app_policy_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_app_secret_config.py b/nuon/models/service_app_secret_config.py deleted file mode 100644 index ef8072fe..00000000 --- a/nuon/models/service_app_secret_config.py +++ /dev/null @@ -1,140 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceAppSecretConfig") - - -@_attrs_define -class ServiceAppSecretConfig: - """ - Attributes: - description (str): - display_name (str): - name (str): - auto_generate (Union[Unset, bool]): - default (Union[Unset, str]): - format_ (Union[Unset, str]): - kubernetes_secret_name (Union[Unset, str]): - kubernetes_secret_namespace (Union[Unset, str]): - kubernetes_sync (Union[Unset, bool]): - required (Union[Unset, bool]): - """ - - description: str - display_name: str - name: str - auto_generate: Union[Unset, bool] = UNSET - default: Union[Unset, str] = UNSET - format_: Union[Unset, str] = UNSET - kubernetes_secret_name: Union[Unset, str] = UNSET - kubernetes_secret_namespace: Union[Unset, str] = UNSET - kubernetes_sync: Union[Unset, bool] = UNSET - required: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - display_name = self.display_name - - name = self.name - - auto_generate = self.auto_generate - - default = self.default - - format_ = self.format_ - - kubernetes_secret_name = self.kubernetes_secret_name - - kubernetes_secret_namespace = self.kubernetes_secret_namespace - - kubernetes_sync = self.kubernetes_sync - - required = self.required - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "description": description, - "display_name": display_name, - "name": name, - } - ) - if auto_generate is not UNSET: - field_dict["auto_generate"] = auto_generate - if default is not UNSET: - field_dict["default"] = default - if format_ is not UNSET: - field_dict["format"] = format_ - if kubernetes_secret_name is not UNSET: - field_dict["kubernetes_secret_name"] = kubernetes_secret_name - if kubernetes_secret_namespace is not UNSET: - field_dict["kubernetes_secret_namespace"] = kubernetes_secret_namespace - if kubernetes_sync is not UNSET: - field_dict["kubernetes_sync"] = kubernetes_sync - if required is not UNSET: - field_dict["required"] = required - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - description = d.pop("description") - - display_name = d.pop("display_name") - - name = d.pop("name") - - auto_generate = d.pop("auto_generate", UNSET) - - default = d.pop("default", UNSET) - - format_ = d.pop("format", UNSET) - - kubernetes_secret_name = d.pop("kubernetes_secret_name", UNSET) - - kubernetes_secret_namespace = d.pop("kubernetes_secret_namespace", UNSET) - - kubernetes_sync = d.pop("kubernetes_sync", UNSET) - - required = d.pop("required", UNSET) - - service_app_secret_config = cls( - description=description, - display_name=display_name, - name=name, - auto_generate=auto_generate, - default=default, - format_=format_, - kubernetes_secret_name=kubernetes_secret_name, - kubernetes_secret_namespace=kubernetes_secret_namespace, - kubernetes_sync=kubernetes_sync, - required=required, - ) - - service_app_secret_config.additional_properties = d - return service_app_secret_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_aws_ecr_image_config_request.py b/nuon/models/service_aws_ecr_image_config_request.py deleted file mode 100644 index 56859d38..00000000 --- a/nuon/models/service_aws_ecr_image_config_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceAwsECRImageConfigRequest") - - -@_attrs_define -class ServiceAwsECRImageConfigRequest: - """ - Attributes: - aws_region (Union[Unset, str]): - iam_role_arn (Union[Unset, str]): - """ - - aws_region: Union[Unset, str] = UNSET - iam_role_arn: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_region = self.aws_region - - iam_role_arn = self.iam_role_arn - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws_region is not UNSET: - field_dict["aws_region"] = aws_region - if iam_role_arn is not UNSET: - field_dict["iam_role_arn"] = iam_role_arn - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - aws_region = d.pop("aws_region", UNSET) - - iam_role_arn = d.pop("iam_role_arn", UNSET) - - service_aws_ecr_image_config_request = cls( - aws_region=aws_region, - iam_role_arn=iam_role_arn, - ) - - service_aws_ecr_image_config_request.additional_properties = d - return service_aws_ecr_image_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_cancel_runner_job_request.py b/nuon/models/service_cancel_runner_job_request.py deleted file mode 100644 index 91ad5557..00000000 --- a/nuon/models/service_cancel_runner_job_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCancelRunnerJobRequest") - - -@_attrs_define -class ServiceCancelRunnerJobRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_cancel_runner_job_request = cls() - - service_cancel_runner_job_request.additional_properties = d - return service_cancel_runner_job_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_cli_config.py b/nuon/models/service_cli_config.py deleted file mode 100644 index 130a8f3a..00000000 --- a/nuon/models/service_cli_config.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCLIConfig") - - -@_attrs_define -class ServiceCLIConfig: - """ - Attributes: - auth_audience (Union[Unset, str]): - auth_client_id (Union[Unset, str]): - auth_domain (Union[Unset, str]): - dashboard_url (Union[Unset, str]): - """ - - auth_audience: Union[Unset, str] = UNSET - auth_client_id: Union[Unset, str] = UNSET - auth_domain: Union[Unset, str] = UNSET - dashboard_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - auth_audience = self.auth_audience - - auth_client_id = self.auth_client_id - - auth_domain = self.auth_domain - - dashboard_url = self.dashboard_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_audience is not UNSET: - field_dict["auth_audience"] = auth_audience - if auth_client_id is not UNSET: - field_dict["auth_client_id"] = auth_client_id - if auth_domain is not UNSET: - field_dict["auth_domain"] = auth_domain - if dashboard_url is not UNSET: - field_dict["dashboard_url"] = dashboard_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - auth_audience = d.pop("auth_audience", UNSET) - - auth_client_id = d.pop("auth_client_id", UNSET) - - auth_domain = d.pop("auth_domain", UNSET) - - dashboard_url = d.pop("dashboard_url", UNSET) - - service_cli_config = cls( - auth_audience=auth_audience, - auth_client_id=auth_client_id, - auth_domain=auth_domain, - dashboard_url=dashboard_url, - ) - - service_cli_config.additional_properties = d - return service_cli_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_component_children.py b/nuon/models/service_component_children.py deleted file mode 100644 index 39be8271..00000000 --- a/nuon/models/service_component_children.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_component import AppComponent - - -T = TypeVar("T", bound="ServiceComponentChildren") - - -@_attrs_define -class ServiceComponentChildren: - """ - Attributes: - children (Union[Unset, list['AppComponent']]): - """ - - children: Union[Unset, list["AppComponent"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - children: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.children, Unset): - children = [] - for children_item_data in self.children: - children_item = children_item_data.to_dict() - children.append(children_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if children is not UNSET: - field_dict["children"] = children - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_component import AppComponent - - d = dict(src_dict) - children = [] - _children = d.pop("children", UNSET) - for children_item_data in _children or []: - children_item = AppComponent.from_dict(children_item_data) - - children.append(children_item) - - service_component_children = cls( - children=children, - ) - - service_component_children.additional_properties = d - return service_component_children - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_connected_github_vcs_action_workflow_config_request.py b/nuon/models/service_connected_github_vcs_action_workflow_config_request.py deleted file mode 100644 index 137abd97..00000000 --- a/nuon/models/service_connected_github_vcs_action_workflow_config_request.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceConnectedGithubVCSActionWorkflowConfigRequest") - - -@_attrs_define -class ServiceConnectedGithubVCSActionWorkflowConfigRequest: - """ - Attributes: - directory (str): - repo (str): - branch (Union[Unset, str]): - git_ref (Union[Unset, str]): - """ - - directory: str - repo: str - branch: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - directory = self.directory - - repo = self.repo - - branch = self.branch - - git_ref = self.git_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "directory": directory, - "repo": repo, - } - ) - if branch is not UNSET: - field_dict["branch"] = branch - if git_ref is not UNSET: - field_dict["gitRef"] = git_ref - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - directory = d.pop("directory") - - repo = d.pop("repo") - - branch = d.pop("branch", UNSET) - - git_ref = d.pop("gitRef", UNSET) - - service_connected_github_vcs_action_workflow_config_request = cls( - directory=directory, - repo=repo, - branch=branch, - git_ref=git_ref, - ) - - service_connected_github_vcs_action_workflow_config_request.additional_properties = d - return service_connected_github_vcs_action_workflow_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_connected_github_vcs_config_request.py b/nuon/models/service_connected_github_vcs_config_request.py deleted file mode 100644 index ffa61a0c..00000000 --- a/nuon/models/service_connected_github_vcs_config_request.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceConnectedGithubVCSConfigRequest") - - -@_attrs_define -class ServiceConnectedGithubVCSConfigRequest: - """ - Attributes: - directory (str): - repo (str): - branch (Union[Unset, str]): - git_ref (Union[Unset, str]): - """ - - directory: str - repo: str - branch: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - directory = self.directory - - repo = self.repo - - branch = self.branch - - git_ref = self.git_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "directory": directory, - "repo": repo, - } - ) - if branch is not UNSET: - field_dict["branch"] = branch - if git_ref is not UNSET: - field_dict["gitRef"] = git_ref - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - directory = d.pop("directory") - - repo = d.pop("repo") - - branch = d.pop("branch", UNSET) - - git_ref = d.pop("gitRef", UNSET) - - service_connected_github_vcs_config_request = cls( - directory=directory, - repo=repo, - branch=branch, - git_ref=git_ref, - ) - - service_connected_github_vcs_config_request.additional_properties = d - return service_connected_github_vcs_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_connected_github_vcs_sandbox_config_request.py b/nuon/models/service_connected_github_vcs_sandbox_config_request.py deleted file mode 100644 index a39543e5..00000000 --- a/nuon/models/service_connected_github_vcs_sandbox_config_request.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceConnectedGithubVCSSandboxConfigRequest") - - -@_attrs_define -class ServiceConnectedGithubVCSSandboxConfigRequest: - """ - Attributes: - directory (str): - repo (str): - branch (Union[Unset, str]): - git_ref (Union[Unset, str]): - """ - - directory: str - repo: str - branch: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - directory = self.directory - - repo = self.repo - - branch = self.branch - - git_ref = self.git_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "directory": directory, - "repo": repo, - } - ) - if branch is not UNSET: - field_dict["branch"] = branch - if git_ref is not UNSET: - field_dict["gitRef"] = git_ref - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - directory = d.pop("directory") - - repo = d.pop("repo") - - branch = d.pop("branch", UNSET) - - git_ref = d.pop("gitRef", UNSET) - - service_connected_github_vcs_sandbox_config_request = cls( - directory=directory, - repo=repo, - branch=branch, - git_ref=git_ref, - ) - - service_connected_github_vcs_sandbox_config_request.additional_properties = d - return service_connected_github_vcs_sandbox_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_request.py b/nuon/models/service_create_action_workflow_config_request.py deleted file mode 100644 index 81b774bc..00000000 --- a/nuon/models/service_create_action_workflow_config_request.py +++ /dev/null @@ -1,138 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_action_workflow_config_step_request import ServiceCreateActionWorkflowConfigStepRequest - from ..models.service_create_action_workflow_config_trigger_request import ( - ServiceCreateActionWorkflowConfigTriggerRequest, - ) - - -T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigRequest") - - -@_attrs_define -class ServiceCreateActionWorkflowConfigRequest: - """ - Attributes: - app_config_id (str): - steps (list['ServiceCreateActionWorkflowConfigStepRequest']): - triggers (list['ServiceCreateActionWorkflowConfigTriggerRequest']): - dependencies (Union[Unset, list[str]]): - references (Union[Unset, list[str]]): - timeout (Union[Unset, int]): - """ - - app_config_id: str - steps: list["ServiceCreateActionWorkflowConfigStepRequest"] - triggers: list["ServiceCreateActionWorkflowConfigTriggerRequest"] - dependencies: Union[Unset, list[str]] = UNSET - references: Union[Unset, list[str]] = UNSET - timeout: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - steps = [] - for steps_item_data in self.steps: - steps_item = steps_item_data.to_dict() - steps.append(steps_item) - - triggers = [] - for triggers_item_data in self.triggers: - triggers_item = triggers_item_data.to_dict() - triggers.append(triggers_item) - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - timeout = self.timeout - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_config_id": app_config_id, - "steps": steps, - "triggers": triggers, - } - ) - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if references is not UNSET: - field_dict["references"] = references - if timeout is not UNSET: - field_dict["timeout"] = timeout - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_action_workflow_config_step_request import ( - ServiceCreateActionWorkflowConfigStepRequest, - ) - from ..models.service_create_action_workflow_config_trigger_request import ( - ServiceCreateActionWorkflowConfigTriggerRequest, - ) - - d = dict(src_dict) - app_config_id = d.pop("app_config_id") - - steps = [] - _steps = d.pop("steps") - for steps_item_data in _steps: - steps_item = ServiceCreateActionWorkflowConfigStepRequest.from_dict(steps_item_data) - - steps.append(steps_item) - - triggers = [] - _triggers = d.pop("triggers") - for triggers_item_data in _triggers: - triggers_item = ServiceCreateActionWorkflowConfigTriggerRequest.from_dict(triggers_item_data) - - triggers.append(triggers_item) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - references = cast(list[str], d.pop("references", UNSET)) - - timeout = d.pop("timeout", UNSET) - - service_create_action_workflow_config_request = cls( - app_config_id=app_config_id, - steps=steps, - triggers=triggers, - dependencies=dependencies, - references=references, - timeout=timeout, - ) - - service_create_action_workflow_config_request.additional_properties = d - return service_create_action_workflow_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_step_request.py b/nuon/models/service_create_action_workflow_config_step_request.py deleted file mode 100644 index 629e7468..00000000 --- a/nuon/models/service_create_action_workflow_config_step_request.py +++ /dev/null @@ -1,162 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_connected_github_vcs_action_workflow_config_request import ( - ServiceConnectedGithubVCSActionWorkflowConfigRequest, - ) - from ..models.service_create_action_workflow_config_step_request_env_vars import ( - ServiceCreateActionWorkflowConfigStepRequestEnvVars, - ) - from ..models.service_public_git_vcs_action_workflow_config_request import ( - ServicePublicGitVCSActionWorkflowConfigRequest, - ) - - -T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigStepRequest") - - -@_attrs_define -class ServiceCreateActionWorkflowConfigStepRequest: - """ - Attributes: - name (str): - command (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSActionWorkflowConfigRequest]): - env_vars (Union[Unset, ServiceCreateActionWorkflowConfigStepRequestEnvVars]): - inline_contents (Union[Unset, str]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSActionWorkflowConfigRequest]): - references (Union[Unset, list[str]]): - """ - - name: str - command: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSActionWorkflowConfigRequest"] = UNSET - env_vars: Union[Unset, "ServiceCreateActionWorkflowConfigStepRequestEnvVars"] = UNSET - inline_contents: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSActionWorkflowConfigRequest"] = UNSET - references: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - command = self.command - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - inline_contents = self.inline_contents - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if command is not UNSET: - field_dict["command"] = command - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if inline_contents is not UNSET: - field_dict["inline_contents"] = inline_contents - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if references is not UNSET: - field_dict["references"] = references - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_connected_github_vcs_action_workflow_config_request import ( - ServiceConnectedGithubVCSActionWorkflowConfigRequest, - ) - from ..models.service_create_action_workflow_config_step_request_env_vars import ( - ServiceCreateActionWorkflowConfigStepRequestEnvVars, - ) - from ..models.service_public_git_vcs_action_workflow_config_request import ( - ServicePublicGitVCSActionWorkflowConfigRequest, - ) - - d = dict(src_dict) - name = d.pop("name") - - command = d.pop("command", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSActionWorkflowConfigRequest] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = ServiceConnectedGithubVCSActionWorkflowConfigRequest.from_dict( - _connected_github_vcs_config - ) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateActionWorkflowConfigStepRequestEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = ServiceCreateActionWorkflowConfigStepRequestEnvVars.from_dict(_env_vars) - - inline_contents = d.pop("inline_contents", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSActionWorkflowConfigRequest] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = ServicePublicGitVCSActionWorkflowConfigRequest.from_dict(_public_git_vcs_config) - - references = cast(list[str], d.pop("references", UNSET)) - - service_create_action_workflow_config_step_request = cls( - name=name, - command=command, - connected_github_vcs_config=connected_github_vcs_config, - env_vars=env_vars, - inline_contents=inline_contents, - public_git_vcs_config=public_git_vcs_config, - references=references, - ) - - service_create_action_workflow_config_step_request.additional_properties = d - return service_create_action_workflow_config_step_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_step_request_env_vars.py b/nuon/models/service_create_action_workflow_config_step_request_env_vars.py deleted file mode 100644 index 43535a25..00000000 --- a/nuon/models/service_create_action_workflow_config_step_request_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigStepRequestEnvVars") - - -@_attrs_define -class ServiceCreateActionWorkflowConfigStepRequestEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_action_workflow_config_step_request_env_vars = cls() - - service_create_action_workflow_config_step_request_env_vars.additional_properties = d - return service_create_action_workflow_config_step_request_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_trigger_request.py b/nuon/models/service_create_action_workflow_config_trigger_request.py deleted file mode 100644 index 46853b53..00000000 --- a/nuon/models/service_create_action_workflow_config_trigger_request.py +++ /dev/null @@ -1,80 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_action_workflow_trigger_type import AppActionWorkflowTriggerType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigTriggerRequest") - - -@_attrs_define -class ServiceCreateActionWorkflowConfigTriggerRequest: - """ - Attributes: - type_ (AppActionWorkflowTriggerType): - component_name (Union[Unset, str]): - cron_schedule (Union[Unset, str]): - """ - - type_: AppActionWorkflowTriggerType - component_name: Union[Unset, str] = UNSET - cron_schedule: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - type_ = self.type_.value - - component_name = self.component_name - - cron_schedule = self.cron_schedule - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "type": type_, - } - ) - if component_name is not UNSET: - field_dict["component_name"] = component_name - if cron_schedule is not UNSET: - field_dict["cron_schedule"] = cron_schedule - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - type_ = AppActionWorkflowTriggerType(d.pop("type")) - - component_name = d.pop("component_name", UNSET) - - cron_schedule = d.pop("cron_schedule", UNSET) - - service_create_action_workflow_config_trigger_request = cls( - type_=type_, - component_name=component_name, - cron_schedule=cron_schedule, - ) - - service_create_action_workflow_config_trigger_request.additional_properties = d - return service_create_action_workflow_config_trigger_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_action_workflow_request.py b/nuon/models/service_create_app_action_workflow_request.py deleted file mode 100644 index db06267a..00000000 --- a/nuon/models/service_create_app_action_workflow_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateAppActionWorkflowRequest") - - -@_attrs_define -class ServiceCreateAppActionWorkflowRequest: - """ - Attributes: - name (Union[Unset, str]): - """ - - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name", UNSET) - - service_create_app_action_workflow_request = cls( - name=name, - ) - - service_create_app_action_workflow_request.additional_properties = d - return service_create_app_action_workflow_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_branch_request.py b/nuon/models/service_create_app_branch_request.py deleted file mode 100644 index 839a6a2b..00000000 --- a/nuon/models/service_create_app_branch_request.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateAppBranchRequest") - - -@_attrs_define -class ServiceCreateAppBranchRequest: - """ - Attributes: - connected_github_vcs_config_id (str): - name (str): - """ - - connected_github_vcs_config_id: str - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connected_github_vcs_config_id = self.connected_github_vcs_config_id - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connected_github_vcs_config_id": connected_github_vcs_config_id, - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connected_github_vcs_config_id = d.pop("connected_github_vcs_config_id") - - name = d.pop("name") - - service_create_app_branch_request = cls( - connected_github_vcs_config_id=connected_github_vcs_config_id, - name=name, - ) - - service_create_app_branch_request.additional_properties = d - return service_create_app_branch_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_break_glass_config_request.py b/nuon/models/service_create_app_break_glass_config_request.py deleted file mode 100644 index cda794f9..00000000 --- a/nuon/models/service_create_app_break_glass_config_request.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig - - -T = TypeVar("T", bound="ServiceCreateAppBreakGlassConfigRequest") - - -@_attrs_define -class ServiceCreateAppBreakGlassConfigRequest: - """ - Attributes: - app_config_id (str): - roles (list['ServiceAppAWSIAMRoleConfig']): - """ - - app_config_id: str - roles: list["ServiceAppAWSIAMRoleConfig"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - roles = [] - for roles_item_data in self.roles: - roles_item = roles_item_data.to_dict() - roles.append(roles_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_config_id": app_config_id, - "roles": roles, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id") - - roles = [] - _roles = d.pop("roles") - for roles_item_data in _roles: - roles_item = ServiceAppAWSIAMRoleConfig.from_dict(roles_item_data) - - roles.append(roles_item) - - service_create_app_break_glass_config_request = cls( - app_config_id=app_config_id, - roles=roles, - ) - - service_create_app_break_glass_config_request.additional_properties = d - return service_create_app_break_glass_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_config_request.py b/nuon/models/service_create_app_config_request.py deleted file mode 100644 index ffe181ea..00000000 --- a/nuon/models/service_create_app_config_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateAppConfigRequest") - - -@_attrs_define -class ServiceCreateAppConfigRequest: - """ - Attributes: - cli_version (Union[Unset, str]): - readme (Union[Unset, str]): not required Readme - """ - - cli_version: Union[Unset, str] = UNSET - readme: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - cli_version = self.cli_version - - readme = self.readme - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cli_version is not UNSET: - field_dict["cli_version"] = cli_version - if readme is not UNSET: - field_dict["readme"] = readme - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - cli_version = d.pop("cli_version", UNSET) - - readme = d.pop("readme", UNSET) - - service_create_app_config_request = cls( - cli_version=cli_version, - readme=readme, - ) - - service_create_app_config_request.additional_properties = d - return service_create_app_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_input_config_request.py b/nuon/models/service_create_app_input_config_request.py deleted file mode 100644 index d0e0bf4e..00000000 --- a/nuon/models/service_create_app_input_config_request.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_app_input_config_request_groups import ServiceCreateAppInputConfigRequestGroups - from ..models.service_create_app_input_config_request_inputs import ServiceCreateAppInputConfigRequestInputs - - -T = TypeVar("T", bound="ServiceCreateAppInputConfigRequest") - - -@_attrs_define -class ServiceCreateAppInputConfigRequest: - """ - Attributes: - groups (ServiceCreateAppInputConfigRequestGroups): - inputs (ServiceCreateAppInputConfigRequestInputs): - app_config_id (Union[Unset, str]): - """ - - groups: "ServiceCreateAppInputConfigRequestGroups" - inputs: "ServiceCreateAppInputConfigRequestInputs" - app_config_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - groups = self.groups.to_dict() - - inputs = self.inputs.to_dict() - - app_config_id = self.app_config_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "groups": groups, - "inputs": inputs, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_app_input_config_request_groups import ServiceCreateAppInputConfigRequestGroups - from ..models.service_create_app_input_config_request_inputs import ServiceCreateAppInputConfigRequestInputs - - d = dict(src_dict) - groups = ServiceCreateAppInputConfigRequestGroups.from_dict(d.pop("groups")) - - inputs = ServiceCreateAppInputConfigRequestInputs.from_dict(d.pop("inputs")) - - app_config_id = d.pop("app_config_id", UNSET) - - service_create_app_input_config_request = cls( - groups=groups, - inputs=inputs, - app_config_id=app_config_id, - ) - - service_create_app_input_config_request.additional_properties = d - return service_create_app_input_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_input_config_request_groups.py b/nuon/models/service_create_app_input_config_request_groups.py deleted file mode 100644 index d005b63d..00000000 --- a/nuon/models/service_create_app_input_config_request_groups.py +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.service_app_group_request import ServiceAppGroupRequest - - -T = TypeVar("T", bound="ServiceCreateAppInputConfigRequestGroups") - - -@_attrs_define -class ServiceCreateAppInputConfigRequestGroups: - """ """ - - additional_properties: dict[str, "ServiceAppGroupRequest"] = _attrs_field(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(): - field_dict[prop_name] = prop.to_dict() - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_group_request import ServiceAppGroupRequest - - d = dict(src_dict) - service_create_app_input_config_request_groups = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = ServiceAppGroupRequest.from_dict(prop_dict) - - additional_properties[prop_name] = additional_property - - service_create_app_input_config_request_groups.additional_properties = additional_properties - return service_create_app_input_config_request_groups - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> "ServiceAppGroupRequest": - return self.additional_properties[key] - - def __setitem__(self, key: str, value: "ServiceAppGroupRequest") -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_input_config_request_inputs.py b/nuon/models/service_create_app_input_config_request_inputs.py deleted file mode 100644 index 71f40ed1..00000000 --- a/nuon/models/service_create_app_input_config_request_inputs.py +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.service_app_input_request import ServiceAppInputRequest - - -T = TypeVar("T", bound="ServiceCreateAppInputConfigRequestInputs") - - -@_attrs_define -class ServiceCreateAppInputConfigRequestInputs: - """ """ - - additional_properties: dict[str, "ServiceAppInputRequest"] = _attrs_field(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(): - field_dict[prop_name] = prop.to_dict() - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_input_request import ServiceAppInputRequest - - d = dict(src_dict) - service_create_app_input_config_request_inputs = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = ServiceAppInputRequest.from_dict(prop_dict) - - additional_properties[prop_name] = additional_property - - service_create_app_input_config_request_inputs.additional_properties = additional_properties - return service_create_app_input_config_request_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> "ServiceAppInputRequest": - return self.additional_properties[key] - - def __setitem__(self, key: str, value: "ServiceAppInputRequest") -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_permissions_config_request.py b/nuon/models/service_create_app_permissions_config_request.py deleted file mode 100644 index cf5a220c..00000000 --- a/nuon/models/service_create_app_permissions_config_request.py +++ /dev/null @@ -1,89 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig - - -T = TypeVar("T", bound="ServiceCreateAppPermissionsConfigRequest") - - -@_attrs_define -class ServiceCreateAppPermissionsConfigRequest: - """ - Attributes: - app_config_id (str): - deprovision_role (ServiceAppAWSIAMRoleConfig): - maintenance_role (ServiceAppAWSIAMRoleConfig): - provision_role (ServiceAppAWSIAMRoleConfig): - """ - - app_config_id: str - deprovision_role: "ServiceAppAWSIAMRoleConfig" - maintenance_role: "ServiceAppAWSIAMRoleConfig" - provision_role: "ServiceAppAWSIAMRoleConfig" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - deprovision_role = self.deprovision_role.to_dict() - - maintenance_role = self.maintenance_role.to_dict() - - provision_role = self.provision_role.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_config_id": app_config_id, - "deprovision_role": deprovision_role, - "maintenance_role": maintenance_role, - "provision_role": provision_role, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id") - - deprovision_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("deprovision_role")) - - maintenance_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("maintenance_role")) - - provision_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("provision_role")) - - service_create_app_permissions_config_request = cls( - app_config_id=app_config_id, - deprovision_role=deprovision_role, - maintenance_role=maintenance_role, - provision_role=provision_role, - ) - - service_create_app_permissions_config_request.additional_properties = d - return service_create_app_permissions_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_policies_config_request.py b/nuon/models/service_create_app_policies_config_request.py deleted file mode 100644 index 692dd09b..00000000 --- a/nuon/models/service_create_app_policies_config_request.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_app_policy_config import ServiceAppPolicyConfig - - -T = TypeVar("T", bound="ServiceCreateAppPoliciesConfigRequest") - - -@_attrs_define -class ServiceCreateAppPoliciesConfigRequest: - """ - Attributes: - app_config_id (str): - policies (Union[Unset, list['ServiceAppPolicyConfig']]): - """ - - app_config_id: str - policies: Union[Unset, list["ServiceAppPolicyConfig"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - policies: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.policies, Unset): - policies = [] - for policies_item_data in self.policies: - policies_item = policies_item_data.to_dict() - policies.append(policies_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_config_id": app_config_id, - } - ) - if policies is not UNSET: - field_dict["policies"] = policies - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_policy_config import ServiceAppPolicyConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id") - - policies = [] - _policies = d.pop("policies", UNSET) - for policies_item_data in _policies or []: - policies_item = ServiceAppPolicyConfig.from_dict(policies_item_data) - - policies.append(policies_item) - - service_create_app_policies_config_request = cls( - app_config_id=app_config_id, - policies=policies, - ) - - service_create_app_policies_config_request.additional_properties = d - return service_create_app_policies_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_request.py b/nuon/models/service_create_app_request.py deleted file mode 100644 index 38e64111..00000000 --- a/nuon/models/service_create_app_request.py +++ /dev/null @@ -1,88 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateAppRequest") - - -@_attrs_define -class ServiceCreateAppRequest: - """ - Attributes: - name (str): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - slack_webhook_url (Union[Unset, str]): - """ - - name: str - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - slack_webhook_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - description = self.description - - display_name = self.display_name - - slack_webhook_url = self.slack_webhook_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if slack_webhook_url is not UNSET: - field_dict["slack_webhook_url"] = slack_webhook_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - slack_webhook_url = d.pop("slack_webhook_url", UNSET) - - service_create_app_request = cls( - name=name, - description=description, - display_name=display_name, - slack_webhook_url=slack_webhook_url, - ) - - service_create_app_request.additional_properties = d - return service_create_app_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_runner_config_request.py b/nuon/models/service_create_app_runner_config_request.py deleted file mode 100644 index 799905d9..00000000 --- a/nuon/models/service_create_app_runner_config_request.py +++ /dev/null @@ -1,121 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_app_runner_config_helm_driver_type import AppAppRunnerConfigHelmDriverType -from ..models.app_app_runner_type import AppAppRunnerType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_app_runner_config_request_env_vars import ServiceCreateAppRunnerConfigRequestEnvVars - - -T = TypeVar("T", bound="ServiceCreateAppRunnerConfigRequest") - - -@_attrs_define -class ServiceCreateAppRunnerConfigRequest: - """ - Attributes: - type_ (AppAppRunnerType): - app_config_id (Union[Unset, str]): - env_vars (Union[Unset, ServiceCreateAppRunnerConfigRequestEnvVars]): - helm_driver (Union[Unset, AppAppRunnerConfigHelmDriverType]): - init_script_url (Union[Unset, str]): - """ - - type_: AppAppRunnerType - app_config_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "ServiceCreateAppRunnerConfigRequestEnvVars"] = UNSET - helm_driver: Union[Unset, AppAppRunnerConfigHelmDriverType] = UNSET - init_script_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - type_ = self.type_.value - - app_config_id = self.app_config_id - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - helm_driver: Union[Unset, str] = UNSET - if not isinstance(self.helm_driver, Unset): - helm_driver = self.helm_driver.value - - init_script_url = self.init_script_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "type": type_, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if helm_driver is not UNSET: - field_dict["helm_driver"] = helm_driver - if init_script_url is not UNSET: - field_dict["init_script_url"] = init_script_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_app_runner_config_request_env_vars import ( - ServiceCreateAppRunnerConfigRequestEnvVars, - ) - - d = dict(src_dict) - type_ = AppAppRunnerType(d.pop("type")) - - app_config_id = d.pop("app_config_id", UNSET) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateAppRunnerConfigRequestEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = ServiceCreateAppRunnerConfigRequestEnvVars.from_dict(_env_vars) - - _helm_driver = d.pop("helm_driver", UNSET) - helm_driver: Union[Unset, AppAppRunnerConfigHelmDriverType] - if isinstance(_helm_driver, Unset): - helm_driver = UNSET - else: - helm_driver = AppAppRunnerConfigHelmDriverType(_helm_driver) - - init_script_url = d.pop("init_script_url", UNSET) - - service_create_app_runner_config_request = cls( - type_=type_, - app_config_id=app_config_id, - env_vars=env_vars, - helm_driver=helm_driver, - init_script_url=init_script_url, - ) - - service_create_app_runner_config_request.additional_properties = d - return service_create_app_runner_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_runner_config_request_env_vars.py b/nuon/models/service_create_app_runner_config_request_env_vars.py deleted file mode 100644 index f5098f78..00000000 --- a/nuon/models/service_create_app_runner_config_request_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateAppRunnerConfigRequestEnvVars") - - -@_attrs_define -class ServiceCreateAppRunnerConfigRequestEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_app_runner_config_request_env_vars = cls() - - service_create_app_runner_config_request_env_vars.additional_properties = d - return service_create_app_runner_config_request_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_sandbox_config_request.py b/nuon/models/service_create_app_sandbox_config_request.py deleted file mode 100644 index 6961c2c3..00000000 --- a/nuon/models/service_create_app_sandbox_config_request.py +++ /dev/null @@ -1,153 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_connected_github_vcs_sandbox_config_request import ( - ServiceConnectedGithubVCSSandboxConfigRequest, - ) - from ..models.service_create_app_sandbox_config_request_env_vars import ServiceCreateAppSandboxConfigRequestEnvVars - from ..models.service_create_app_sandbox_config_request_variables import ( - ServiceCreateAppSandboxConfigRequestVariables, - ) - from ..models.service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest - - -T = TypeVar("T", bound="ServiceCreateAppSandboxConfigRequest") - - -@_attrs_define -class ServiceCreateAppSandboxConfigRequest: - """ - Attributes: - env_vars (ServiceCreateAppSandboxConfigRequestEnvVars): - terraform_version (str): - variables (ServiceCreateAppSandboxConfigRequestVariables): - app_config_id (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSSandboxConfigRequest]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSSandboxConfigRequest]): - variables_files (Union[Unset, list[str]]): - """ - - env_vars: "ServiceCreateAppSandboxConfigRequestEnvVars" - terraform_version: str - variables: "ServiceCreateAppSandboxConfigRequestVariables" - app_config_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSSandboxConfigRequest"] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSSandboxConfigRequest"] = UNSET - variables_files: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - env_vars = self.env_vars.to_dict() - - terraform_version = self.terraform_version - - variables = self.variables.to_dict() - - app_config_id = self.app_config_id - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - variables_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.variables_files, Unset): - variables_files = self.variables_files - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "env_vars": env_vars, - "terraform_version": terraform_version, - "variables": variables, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if variables_files is not UNSET: - field_dict["variables_files"] = variables_files - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_connected_github_vcs_sandbox_config_request import ( - ServiceConnectedGithubVCSSandboxConfigRequest, - ) - from ..models.service_create_app_sandbox_config_request_env_vars import ( - ServiceCreateAppSandboxConfigRequestEnvVars, - ) - from ..models.service_create_app_sandbox_config_request_variables import ( - ServiceCreateAppSandboxConfigRequestVariables, - ) - from ..models.service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest - - d = dict(src_dict) - env_vars = ServiceCreateAppSandboxConfigRequestEnvVars.from_dict(d.pop("env_vars")) - - terraform_version = d.pop("terraform_version") - - variables = ServiceCreateAppSandboxConfigRequestVariables.from_dict(d.pop("variables")) - - app_config_id = d.pop("app_config_id", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSSandboxConfigRequest] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = ServiceConnectedGithubVCSSandboxConfigRequest.from_dict( - _connected_github_vcs_config - ) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSSandboxConfigRequest] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = ServicePublicGitVCSSandboxConfigRequest.from_dict(_public_git_vcs_config) - - variables_files = cast(list[str], d.pop("variables_files", UNSET)) - - service_create_app_sandbox_config_request = cls( - env_vars=env_vars, - terraform_version=terraform_version, - variables=variables, - app_config_id=app_config_id, - connected_github_vcs_config=connected_github_vcs_config, - public_git_vcs_config=public_git_vcs_config, - variables_files=variables_files, - ) - - service_create_app_sandbox_config_request.additional_properties = d - return service_create_app_sandbox_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_sandbox_config_request_env_vars.py b/nuon/models/service_create_app_sandbox_config_request_env_vars.py deleted file mode 100644 index 7fc7b0a3..00000000 --- a/nuon/models/service_create_app_sandbox_config_request_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateAppSandboxConfigRequestEnvVars") - - -@_attrs_define -class ServiceCreateAppSandboxConfigRequestEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_app_sandbox_config_request_env_vars = cls() - - service_create_app_sandbox_config_request_env_vars.additional_properties = d - return service_create_app_sandbox_config_request_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_sandbox_config_request_variables.py b/nuon/models/service_create_app_sandbox_config_request_variables.py deleted file mode 100644 index 08150e96..00000000 --- a/nuon/models/service_create_app_sandbox_config_request_variables.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateAppSandboxConfigRequestVariables") - - -@_attrs_define -class ServiceCreateAppSandboxConfigRequestVariables: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_app_sandbox_config_request_variables = cls() - - service_create_app_sandbox_config_request_variables.additional_properties = d - return service_create_app_sandbox_config_request_variables - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_secret_request.py b/nuon/models/service_create_app_secret_request.py deleted file mode 100644 index cf276988..00000000 --- a/nuon/models/service_create_app_secret_request.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateAppSecretRequest") - - -@_attrs_define -class ServiceCreateAppSecretRequest: - """ - Attributes: - name (str): - value (str): - """ - - name: str - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - value = d.pop("value") - - service_create_app_secret_request = cls( - name=name, - value=value, - ) - - service_create_app_secret_request.additional_properties = d - return service_create_app_secret_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_secrets_config_request.py b/nuon/models/service_create_app_secrets_config_request.py deleted file mode 100644 index ea971d90..00000000 --- a/nuon/models/service_create_app_secrets_config_request.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_app_secret_config import ServiceAppSecretConfig - - -T = TypeVar("T", bound="ServiceCreateAppSecretsConfigRequest") - - -@_attrs_define -class ServiceCreateAppSecretsConfigRequest: - """ - Attributes: - app_config_id (str): - secrets (Union[Unset, list['ServiceAppSecretConfig']]): - """ - - app_config_id: str - secrets: Union[Unset, list["ServiceAppSecretConfig"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - secrets: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.secrets, Unset): - secrets = [] - for secrets_item_data in self.secrets: - secrets_item = secrets_item_data.to_dict() - secrets.append(secrets_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_config_id": app_config_id, - } - ) - if secrets is not UNSET: - field_dict["secrets"] = secrets - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_app_secret_config import ServiceAppSecretConfig - - d = dict(src_dict) - app_config_id = d.pop("app_config_id") - - secrets = [] - _secrets = d.pop("secrets", UNSET) - for secrets_item_data in _secrets or []: - secrets_item = ServiceAppSecretConfig.from_dict(secrets_item_data) - - secrets.append(secrets_item) - - service_create_app_secrets_config_request = cls( - app_config_id=app_config_id, - secrets=secrets, - ) - - service_create_app_secrets_config_request.additional_properties = d - return service_create_app_secrets_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_app_stack_config_request.py b/nuon/models/service_create_app_stack_config_request.py deleted file mode 100644 index 90b412d6..00000000 --- a/nuon/models/service_create_app_stack_config_request.py +++ /dev/null @@ -1,104 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_stack_type import AppStackType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateAppStackConfigRequest") - - -@_attrs_define -class ServiceCreateAppStackConfigRequest: - """ - Attributes: - app_config_id (str): - description (str): - name (str): - type_ (AppStackType): - runner_nested_template_url (Union[Unset, str]): - vpc_nested_template_url (Union[Unset, str]): - """ - - app_config_id: str - description: str - name: str - type_: AppStackType - runner_nested_template_url: Union[Unset, str] = UNSET - vpc_nested_template_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - description = self.description - - name = self.name - - type_ = self.type_.value - - runner_nested_template_url = self.runner_nested_template_url - - vpc_nested_template_url = self.vpc_nested_template_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_config_id": app_config_id, - "description": description, - "name": name, - "type": type_, - } - ) - if runner_nested_template_url is not UNSET: - field_dict["runner_nested_template_url"] = runner_nested_template_url - if vpc_nested_template_url is not UNSET: - field_dict["vpc_nested_template_url"] = vpc_nested_template_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_config_id = d.pop("app_config_id") - - description = d.pop("description") - - name = d.pop("name") - - type_ = AppStackType(d.pop("type")) - - runner_nested_template_url = d.pop("runner_nested_template_url", UNSET) - - vpc_nested_template_url = d.pop("vpc_nested_template_url", UNSET) - - service_create_app_stack_config_request = cls( - app_config_id=app_config_id, - description=description, - name=name, - type_=type_, - runner_nested_template_url=runner_nested_template_url, - vpc_nested_template_url=vpc_nested_template_url, - ) - - service_create_app_stack_config_request.additional_properties = d - return service_create_app_stack_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_component_build_request.py b/nuon/models/service_create_component_build_request.py deleted file mode 100644 index 7bed66c8..00000000 --- a/nuon/models/service_create_component_build_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateComponentBuildRequest") - - -@_attrs_define -class ServiceCreateComponentBuildRequest: - """ - Attributes: - git_ref (Union[Unset, str]): - use_latest (Union[Unset, bool]): - """ - - git_ref: Union[Unset, str] = UNSET - use_latest: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - git_ref = self.git_ref - - use_latest = self.use_latest - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if git_ref is not UNSET: - field_dict["git_ref"] = git_ref - if use_latest is not UNSET: - field_dict["use_latest"] = use_latest - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - git_ref = d.pop("git_ref", UNSET) - - use_latest = d.pop("use_latest", UNSET) - - service_create_component_build_request = cls( - git_ref=git_ref, - use_latest=use_latest, - ) - - service_create_component_build_request.additional_properties = d - return service_create_component_build_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_component_release_request.py b/nuon/models/service_create_component_release_request.py deleted file mode 100644 index 7c2f8d7b..00000000 --- a/nuon/models/service_create_component_release_request.py +++ /dev/null @@ -1,103 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_component_release_request_strategy import ServiceCreateComponentReleaseRequestStrategy - - -T = TypeVar("T", bound="ServiceCreateComponentReleaseRequest") - - -@_attrs_define -class ServiceCreateComponentReleaseRequest: - """ - Attributes: - auto_build (Union[Unset, bool]): - build_id (Union[Unset, str]): - install_ids (Union[Unset, list[str]]): - strategy (Union[Unset, ServiceCreateComponentReleaseRequestStrategy]): - """ - - auto_build: Union[Unset, bool] = UNSET - build_id: Union[Unset, str] = UNSET - install_ids: Union[Unset, list[str]] = UNSET - strategy: Union[Unset, "ServiceCreateComponentReleaseRequestStrategy"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - auto_build = self.auto_build - - build_id = self.build_id - - install_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.install_ids, Unset): - install_ids = self.install_ids - - strategy: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.strategy, Unset): - strategy = self.strategy.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auto_build is not UNSET: - field_dict["auto_build"] = auto_build - if build_id is not UNSET: - field_dict["build_id"] = build_id - if install_ids is not UNSET: - field_dict["install_ids"] = install_ids - if strategy is not UNSET: - field_dict["strategy"] = strategy - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_component_release_request_strategy import ( - ServiceCreateComponentReleaseRequestStrategy, - ) - - d = dict(src_dict) - auto_build = d.pop("auto_build", UNSET) - - build_id = d.pop("build_id", UNSET) - - install_ids = cast(list[str], d.pop("install_ids", UNSET)) - - _strategy = d.pop("strategy", UNSET) - strategy: Union[Unset, ServiceCreateComponentReleaseRequestStrategy] - if isinstance(_strategy, Unset): - strategy = UNSET - else: - strategy = ServiceCreateComponentReleaseRequestStrategy.from_dict(_strategy) - - service_create_component_release_request = cls( - auto_build=auto_build, - build_id=build_id, - install_ids=install_ids, - strategy=strategy, - ) - - service_create_component_release_request.additional_properties = d - return service_create_component_release_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_component_release_request_strategy.py b/nuon/models/service_create_component_release_request_strategy.py deleted file mode 100644 index 78688e15..00000000 --- a/nuon/models/service_create_component_release_request_strategy.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateComponentReleaseRequestStrategy") - - -@_attrs_define -class ServiceCreateComponentReleaseRequestStrategy: - """ - Attributes: - delay (Union[Unset, str]): - installs_per_step (Union[Unset, int]): - """ - - delay: Union[Unset, str] = UNSET - installs_per_step: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - delay = self.delay - - installs_per_step = self.installs_per_step - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if delay is not UNSET: - field_dict["delay"] = delay - if installs_per_step is not UNSET: - field_dict["installs_per_step"] = installs_per_step - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - delay = d.pop("delay", UNSET) - - installs_per_step = d.pop("installs_per_step", UNSET) - - service_create_component_release_request_strategy = cls( - delay=delay, - installs_per_step=installs_per_step, - ) - - service_create_component_release_request_strategy.additional_properties = d - return service_create_component_release_request_strategy - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_component_request.py b/nuon/models/service_create_component_request.py deleted file mode 100644 index 28bc9c45..00000000 --- a/nuon/models/service_create_component_request.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateComponentRequest") - - -@_attrs_define -class ServiceCreateComponentRequest: - """ - Attributes: - name (str): - dependencies (Union[Unset, list[str]]): - var_name (Union[Unset, str]): - """ - - name: str - dependencies: Union[Unset, list[str]] = UNSET - var_name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - var_name = self.var_name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if var_name is not UNSET: - field_dict["var_name"] = var_name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - var_name = d.pop("var_name", UNSET) - - service_create_component_request = cls( - name=name, - dependencies=dependencies, - var_name=var_name, - ) - - service_create_component_request.additional_properties = d - return service_create_component_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_connection_callback_request.py b/nuon/models/service_create_connection_callback_request.py deleted file mode 100644 index 5ac6739c..00000000 --- a/nuon/models/service_create_connection_callback_request.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateConnectionCallbackRequest") - - -@_attrs_define -class ServiceCreateConnectionCallbackRequest: - """ - Attributes: - github_install_id (str): - org_id (str): - """ - - github_install_id: str - org_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github_install_id = self.github_install_id - - org_id = self.org_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github_install_id": github_install_id, - "org_id": org_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - github_install_id = d.pop("github_install_id") - - org_id = d.pop("org_id") - - service_create_connection_callback_request = cls( - github_install_id=github_install_id, - org_id=org_id, - ) - - service_create_connection_callback_request.additional_properties = d - return service_create_connection_callback_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_connection_request.py b/nuon/models/service_create_connection_request.py deleted file mode 100644 index e48abf36..00000000 --- a/nuon/models/service_create_connection_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateConnectionRequest") - - -@_attrs_define -class ServiceCreateConnectionRequest: - """ - Attributes: - github_install_id (str): - """ - - github_install_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github_install_id = self.github_install_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github_install_id": github_install_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - github_install_id = d.pop("github_install_id") - - service_create_connection_request = cls( - github_install_id=github_install_id, - ) - - service_create_connection_request.additional_properties = d - return service_create_connection_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_docker_build_component_config_request.py b/nuon/models/service_create_docker_build_component_config_request.py deleted file mode 100644 index 035ea301..00000000 --- a/nuon/models/service_create_docker_build_component_config_request.py +++ /dev/null @@ -1,183 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest - from ..models.service_create_docker_build_component_config_request_env_vars import ( - ServiceCreateDockerBuildComponentConfigRequestEnvVars, - ) - from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest - - -T = TypeVar("T", bound="ServiceCreateDockerBuildComponentConfigRequest") - - -@_attrs_define -class ServiceCreateDockerBuildComponentConfigRequest: - """ - Attributes: - dockerfile (str): - app_config_id (Union[Unset, str]): - build_args (Union[Unset, list[str]]): - checksum (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): - dependencies (Union[Unset, list[str]]): - env_vars (Union[Unset, ServiceCreateDockerBuildComponentConfigRequestEnvVars]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): - references (Union[Unset, list[str]]): - target (Union[Unset, str]): - """ - - dockerfile: str - app_config_id: Union[Unset, str] = UNSET - build_args: Union[Unset, list[str]] = UNSET - checksum: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - env_vars: Union[Unset, "ServiceCreateDockerBuildComponentConfigRequestEnvVars"] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET - references: Union[Unset, list[str]] = UNSET - target: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - dockerfile = self.dockerfile - - app_config_id = self.app_config_id - - build_args: Union[Unset, list[str]] = UNSET - if not isinstance(self.build_args, Unset): - build_args = self.build_args - - checksum = self.checksum - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - target = self.target - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "dockerfile": dockerfile, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if build_args is not UNSET: - field_dict["build_args"] = build_args - if checksum is not UNSET: - field_dict["checksum"] = checksum - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if references is not UNSET: - field_dict["references"] = references - if target is not UNSET: - field_dict["target"] = target - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest - from ..models.service_create_docker_build_component_config_request_env_vars import ( - ServiceCreateDockerBuildComponentConfigRequestEnvVars, - ) - from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest - - d = dict(src_dict) - dockerfile = d.pop("dockerfile") - - app_config_id = d.pop("app_config_id", UNSET) - - build_args = cast(list[str], d.pop("build_args", UNSET)) - - checksum = d.pop("checksum", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = ServiceConnectedGithubVCSConfigRequest.from_dict(_connected_github_vcs_config) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateDockerBuildComponentConfigRequestEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = ServiceCreateDockerBuildComponentConfigRequestEnvVars.from_dict(_env_vars) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = ServicePublicGitVCSConfigRequest.from_dict(_public_git_vcs_config) - - references = cast(list[str], d.pop("references", UNSET)) - - target = d.pop("target", UNSET) - - service_create_docker_build_component_config_request = cls( - dockerfile=dockerfile, - app_config_id=app_config_id, - build_args=build_args, - checksum=checksum, - connected_github_vcs_config=connected_github_vcs_config, - dependencies=dependencies, - env_vars=env_vars, - public_git_vcs_config=public_git_vcs_config, - references=references, - target=target, - ) - - service_create_docker_build_component_config_request.additional_properties = d - return service_create_docker_build_component_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_docker_build_component_config_request_env_vars.py b/nuon/models/service_create_docker_build_component_config_request_env_vars.py deleted file mode 100644 index 2f118ba1..00000000 --- a/nuon/models/service_create_docker_build_component_config_request_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateDockerBuildComponentConfigRequestEnvVars") - - -@_attrs_define -class ServiceCreateDockerBuildComponentConfigRequestEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_docker_build_component_config_request_env_vars = cls() - - service_create_docker_build_component_config_request_env_vars.additional_properties = d - return service_create_docker_build_component_config_request_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_external_image_component_config_request.py b/nuon/models/service_create_external_image_component_config_request.py deleted file mode 100644 index f366cc13..00000000 --- a/nuon/models/service_create_external_image_component_config_request.py +++ /dev/null @@ -1,131 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest - - -T = TypeVar("T", bound="ServiceCreateExternalImageComponentConfigRequest") - - -@_attrs_define -class ServiceCreateExternalImageComponentConfigRequest: - """ - Attributes: - image_url (str): - tag (str): - app_config_id (Union[Unset, str]): - aws_ecr_image_config (Union[Unset, ServiceAwsECRImageConfigRequest]): - checksum (Union[Unset, str]): - dependencies (Union[Unset, list[str]]): - references (Union[Unset, list[str]]): - """ - - image_url: str - tag: str - app_config_id: Union[Unset, str] = UNSET - aws_ecr_image_config: Union[Unset, "ServiceAwsECRImageConfigRequest"] = UNSET - checksum: Union[Unset, str] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - references: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - image_url = self.image_url - - tag = self.tag - - app_config_id = self.app_config_id - - aws_ecr_image_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws_ecr_image_config, Unset): - aws_ecr_image_config = self.aws_ecr_image_config.to_dict() - - checksum = self.checksum - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "image_url": image_url, - "tag": tag, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if aws_ecr_image_config is not UNSET: - field_dict["aws_ecr_image_config"] = aws_ecr_image_config - if checksum is not UNSET: - field_dict["checksum"] = checksum - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if references is not UNSET: - field_dict["references"] = references - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest - - d = dict(src_dict) - image_url = d.pop("image_url") - - tag = d.pop("tag") - - app_config_id = d.pop("app_config_id", UNSET) - - _aws_ecr_image_config = d.pop("aws_ecr_image_config", UNSET) - aws_ecr_image_config: Union[Unset, ServiceAwsECRImageConfigRequest] - if isinstance(_aws_ecr_image_config, Unset): - aws_ecr_image_config = UNSET - else: - aws_ecr_image_config = ServiceAwsECRImageConfigRequest.from_dict(_aws_ecr_image_config) - - checksum = d.pop("checksum", UNSET) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - references = cast(list[str], d.pop("references", UNSET)) - - service_create_external_image_component_config_request = cls( - image_url=image_url, - tag=tag, - app_config_id=app_config_id, - aws_ecr_image_config=aws_ecr_image_config, - checksum=checksum, - dependencies=dependencies, - references=references, - ) - - service_create_external_image_component_config_request.additional_properties = d - return service_create_external_image_component_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_helm_component_config_request.py b/nuon/models/service_create_helm_component_config_request.py deleted file mode 100644 index f15b3598..00000000 --- a/nuon/models/service_create_helm_component_config_request.py +++ /dev/null @@ -1,193 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest - from ..models.service_create_helm_component_config_request_values import ( - ServiceCreateHelmComponentConfigRequestValues, - ) - from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest - - -T = TypeVar("T", bound="ServiceCreateHelmComponentConfigRequest") - - -@_attrs_define -class ServiceCreateHelmComponentConfigRequest: - """ - Attributes: - chart_name (str): - values (ServiceCreateHelmComponentConfigRequestValues): - app_config_id (Union[Unset, str]): - checksum (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): - dependencies (Union[Unset, list[str]]): - namespace (Union[Unset, str]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): - references (Union[Unset, list[str]]): - storage_driver (Union[Unset, str]): - take_ownership (Union[Unset, bool]): - values_files (Union[Unset, list[str]]): - """ - - chart_name: str - values: "ServiceCreateHelmComponentConfigRequestValues" - app_config_id: Union[Unset, str] = UNSET - checksum: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - namespace: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET - references: Union[Unset, list[str]] = UNSET - storage_driver: Union[Unset, str] = UNSET - take_ownership: Union[Unset, bool] = UNSET - values_files: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - chart_name = self.chart_name - - values = self.values.to_dict() - - app_config_id = self.app_config_id - - checksum = self.checksum - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - namespace = self.namespace - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - storage_driver = self.storage_driver - - take_ownership = self.take_ownership - - values_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.values_files, Unset): - values_files = self.values_files - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "chart_name": chart_name, - "values": values, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if checksum is not UNSET: - field_dict["checksum"] = checksum - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if namespace is not UNSET: - field_dict["namespace"] = namespace - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if references is not UNSET: - field_dict["references"] = references - if storage_driver is not UNSET: - field_dict["storage_driver"] = storage_driver - if take_ownership is not UNSET: - field_dict["take_ownership"] = take_ownership - if values_files is not UNSET: - field_dict["values_files"] = values_files - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest - from ..models.service_create_helm_component_config_request_values import ( - ServiceCreateHelmComponentConfigRequestValues, - ) - from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest - - d = dict(src_dict) - chart_name = d.pop("chart_name") - - values = ServiceCreateHelmComponentConfigRequestValues.from_dict(d.pop("values")) - - app_config_id = d.pop("app_config_id", UNSET) - - checksum = d.pop("checksum", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = ServiceConnectedGithubVCSConfigRequest.from_dict(_connected_github_vcs_config) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - namespace = d.pop("namespace", UNSET) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = ServicePublicGitVCSConfigRequest.from_dict(_public_git_vcs_config) - - references = cast(list[str], d.pop("references", UNSET)) - - storage_driver = d.pop("storage_driver", UNSET) - - take_ownership = d.pop("take_ownership", UNSET) - - values_files = cast(list[str], d.pop("values_files", UNSET)) - - service_create_helm_component_config_request = cls( - chart_name=chart_name, - values=values, - app_config_id=app_config_id, - checksum=checksum, - connected_github_vcs_config=connected_github_vcs_config, - dependencies=dependencies, - namespace=namespace, - public_git_vcs_config=public_git_vcs_config, - references=references, - storage_driver=storage_driver, - take_ownership=take_ownership, - values_files=values_files, - ) - - service_create_helm_component_config_request.additional_properties = d - return service_create_helm_component_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_helm_component_config_request_values.py b/nuon/models/service_create_helm_component_config_request_values.py deleted file mode 100644 index a98ebfee..00000000 --- a/nuon/models/service_create_helm_component_config_request_values.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateHelmComponentConfigRequestValues") - - -@_attrs_define -class ServiceCreateHelmComponentConfigRequestValues: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_helm_component_config_request_values = cls() - - service_create_helm_component_config_request_values.additional_properties = d - return service_create_helm_component_config_request_values - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_action_workflow_run_request.py b/nuon/models/service_create_install_action_workflow_run_request.py deleted file mode 100644 index 38e0b8fc..00000000 --- a/nuon/models/service_create_install_action_workflow_run_request.py +++ /dev/null @@ -1,85 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_install_action_workflow_run_request_run_env_vars import ( - ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, - ) - - -T = TypeVar("T", bound="ServiceCreateInstallActionWorkflowRunRequest") - - -@_attrs_define -class ServiceCreateInstallActionWorkflowRunRequest: - """ - Attributes: - action_workflow_config_id (Union[Unset, str]): - run_env_vars (Union[Unset, ServiceCreateInstallActionWorkflowRunRequestRunEnvVars]): - """ - - action_workflow_config_id: Union[Unset, str] = UNSET - run_env_vars: Union[Unset, "ServiceCreateInstallActionWorkflowRunRequestRunEnvVars"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - action_workflow_config_id = self.action_workflow_config_id - - run_env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.run_env_vars, Unset): - run_env_vars = self.run_env_vars.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if action_workflow_config_id is not UNSET: - field_dict["action_workflow_config_id"] = action_workflow_config_id - if run_env_vars is not UNSET: - field_dict["run_env_vars"] = run_env_vars - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_install_action_workflow_run_request_run_env_vars import ( - ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, - ) - - d = dict(src_dict) - action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) - - _run_env_vars = d.pop("run_env_vars", UNSET) - run_env_vars: Union[Unset, ServiceCreateInstallActionWorkflowRunRequestRunEnvVars] - if isinstance(_run_env_vars, Unset): - run_env_vars = UNSET - else: - run_env_vars = ServiceCreateInstallActionWorkflowRunRequestRunEnvVars.from_dict(_run_env_vars) - - service_create_install_action_workflow_run_request = cls( - action_workflow_config_id=action_workflow_config_id, - run_env_vars=run_env_vars, - ) - - service_create_install_action_workflow_run_request.additional_properties = d - return service_create_install_action_workflow_run_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py b/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py deleted file mode 100644 index 10aff0bc..00000000 --- a/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateInstallActionWorkflowRunRequestRunEnvVars") - - -@_attrs_define -class ServiceCreateInstallActionWorkflowRunRequestRunEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_install_action_workflow_run_request_run_env_vars = cls() - - service_create_install_action_workflow_run_request_run_env_vars.additional_properties = d - return service_create_install_action_workflow_run_request_run_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_config_request.py b/nuon/models/service_create_install_config_request.py deleted file mode 100644 index 998dbd0f..00000000 --- a/nuon/models/service_create_install_config_request.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_approval_option import AppInstallApprovalOption -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateInstallConfigRequest") - - -@_attrs_define -class ServiceCreateInstallConfigRequest: - """ - Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - """ - - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_option: Union[Unset, str] = UNSET - if not isinstance(self.approval_option, Unset): - approval_option = self.approval_option.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if approval_option is not UNSET: - field_dict["approval_option"] = approval_option - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - _approval_option = d.pop("approval_option", UNSET) - approval_option: Union[Unset, AppInstallApprovalOption] - if isinstance(_approval_option, Unset): - approval_option = UNSET - else: - approval_option = AppInstallApprovalOption(_approval_option) - - service_create_install_config_request = cls( - approval_option=approval_option, - ) - - service_create_install_config_request.additional_properties = d - return service_create_install_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_deploy_request.py b/nuon/models/service_create_install_deploy_request.py deleted file mode 100644 index 490946ff..00000000 --- a/nuon/models/service_create_install_deploy_request.py +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateInstallDeployRequest") - - -@_attrs_define -class ServiceCreateInstallDeployRequest: - """ - Attributes: - build_id (Union[Unset, str]): - deploy_dependents (Union[Unset, bool]): - plan_only (Union[Unset, bool]): - """ - - build_id: Union[Unset, str] = UNSET - deploy_dependents: Union[Unset, bool] = UNSET - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - build_id = self.build_id - - deploy_dependents = self.deploy_dependents - - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if build_id is not UNSET: - field_dict["build_id"] = build_id - if deploy_dependents is not UNSET: - field_dict["deploy_dependents"] = deploy_dependents - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - build_id = d.pop("build_id", UNSET) - - deploy_dependents = d.pop("deploy_dependents", UNSET) - - plan_only = d.pop("plan_only", UNSET) - - service_create_install_deploy_request = cls( - build_id=build_id, - deploy_dependents=deploy_dependents, - plan_only=plan_only, - ) - - service_create_install_deploy_request.additional_properties = d - return service_create_install_deploy_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_inputs_request.py b/nuon/models/service_create_install_inputs_request.py deleted file mode 100644 index f09fae99..00000000 --- a/nuon/models/service_create_install_inputs_request.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.service_create_install_inputs_request_inputs import ServiceCreateInstallInputsRequestInputs - - -T = TypeVar("T", bound="ServiceCreateInstallInputsRequest") - - -@_attrs_define -class ServiceCreateInstallInputsRequest: - """ - Attributes: - inputs (ServiceCreateInstallInputsRequestInputs): - """ - - inputs: "ServiceCreateInstallInputsRequestInputs" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - inputs = self.inputs.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "inputs": inputs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_install_inputs_request_inputs import ServiceCreateInstallInputsRequestInputs - - d = dict(src_dict) - inputs = ServiceCreateInstallInputsRequestInputs.from_dict(d.pop("inputs")) - - service_create_install_inputs_request = cls( - inputs=inputs, - ) - - service_create_install_inputs_request.additional_properties = d - return service_create_install_inputs_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_inputs_request_inputs.py b/nuon/models/service_create_install_inputs_request_inputs.py deleted file mode 100644 index a94c7938..00000000 --- a/nuon/models/service_create_install_inputs_request_inputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateInstallInputsRequestInputs") - - -@_attrs_define -class ServiceCreateInstallInputsRequestInputs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_install_inputs_request_inputs = cls() - - service_create_install_inputs_request_inputs.additional_properties = d - return service_create_install_inputs_request_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_request.py b/nuon/models/service_create_install_request.py deleted file mode 100644 index 6a1ccd35..00000000 --- a/nuon/models/service_create_install_request.py +++ /dev/null @@ -1,137 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams - from ..models.service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount - from ..models.service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount - from ..models.service_create_install_request_inputs import ServiceCreateInstallRequestInputs - - -T = TypeVar("T", bound="ServiceCreateInstallRequest") - - -@_attrs_define -class ServiceCreateInstallRequest: - """ - Attributes: - name (str): - aws_account (Union[Unset, ServiceCreateInstallRequestAwsAccount]): - azure_account (Union[Unset, ServiceCreateInstallRequestAzureAccount]): - inputs (Union[Unset, ServiceCreateInstallRequestInputs]): - install_config (Union[Unset, HelpersCreateInstallConfigParams]): - """ - - name: str - aws_account: Union[Unset, "ServiceCreateInstallRequestAwsAccount"] = UNSET - azure_account: Union[Unset, "ServiceCreateInstallRequestAzureAccount"] = UNSET - inputs: Union[Unset, "ServiceCreateInstallRequestInputs"] = UNSET - install_config: Union[Unset, "HelpersCreateInstallConfigParams"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - aws_account: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws_account, Unset): - aws_account = self.aws_account.to_dict() - - azure_account: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.azure_account, Unset): - azure_account = self.azure_account.to_dict() - - inputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.inputs, Unset): - inputs = self.inputs.to_dict() - - install_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.install_config, Unset): - install_config = self.install_config.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if aws_account is not UNSET: - field_dict["aws_account"] = aws_account - if azure_account is not UNSET: - field_dict["azure_account"] = azure_account - if inputs is not UNSET: - field_dict["inputs"] = inputs - if install_config is not UNSET: - field_dict["install_config"] = install_config - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams - from ..models.service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount - from ..models.service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount - from ..models.service_create_install_request_inputs import ServiceCreateInstallRequestInputs - - d = dict(src_dict) - name = d.pop("name") - - _aws_account = d.pop("aws_account", UNSET) - aws_account: Union[Unset, ServiceCreateInstallRequestAwsAccount] - if isinstance(_aws_account, Unset): - aws_account = UNSET - else: - aws_account = ServiceCreateInstallRequestAwsAccount.from_dict(_aws_account) - - _azure_account = d.pop("azure_account", UNSET) - azure_account: Union[Unset, ServiceCreateInstallRequestAzureAccount] - if isinstance(_azure_account, Unset): - azure_account = UNSET - else: - azure_account = ServiceCreateInstallRequestAzureAccount.from_dict(_azure_account) - - _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, ServiceCreateInstallRequestInputs] - if isinstance(_inputs, Unset): - inputs = UNSET - else: - inputs = ServiceCreateInstallRequestInputs.from_dict(_inputs) - - _install_config = d.pop("install_config", UNSET) - install_config: Union[Unset, HelpersCreateInstallConfigParams] - if isinstance(_install_config, Unset): - install_config = UNSET - else: - install_config = HelpersCreateInstallConfigParams.from_dict(_install_config) - - service_create_install_request = cls( - name=name, - aws_account=aws_account, - azure_account=azure_account, - inputs=inputs, - install_config=install_config, - ) - - service_create_install_request.additional_properties = d - return service_create_install_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_request_aws_account.py b/nuon/models/service_create_install_request_aws_account.py deleted file mode 100644 index 17f41749..00000000 --- a/nuon/models/service_create_install_request_aws_account.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateInstallRequestAwsAccount") - - -@_attrs_define -class ServiceCreateInstallRequestAwsAccount: - """ - Attributes: - iam_role_arn (Union[Unset, str]): - region (Union[Unset, str]): - """ - - iam_role_arn: Union[Unset, str] = UNSET - region: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - iam_role_arn = self.iam_role_arn - - region = self.region - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if iam_role_arn is not UNSET: - field_dict["iam_role_arn"] = iam_role_arn - if region is not UNSET: - field_dict["region"] = region - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - iam_role_arn = d.pop("iam_role_arn", UNSET) - - region = d.pop("region", UNSET) - - service_create_install_request_aws_account = cls( - iam_role_arn=iam_role_arn, - region=region, - ) - - service_create_install_request_aws_account.additional_properties = d - return service_create_install_request_aws_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_request_azure_account.py b/nuon/models/service_create_install_request_azure_account.py deleted file mode 100644 index 49c6511d..00000000 --- a/nuon/models/service_create_install_request_azure_account.py +++ /dev/null @@ -1,95 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateInstallRequestAzureAccount") - - -@_attrs_define -class ServiceCreateInstallRequestAzureAccount: - """ - Attributes: - location (Union[Unset, str]): - service_principal_app_id (Union[Unset, str]): - service_principal_password (Union[Unset, str]): - subscription_id (Union[Unset, str]): - subscription_tenant_id (Union[Unset, str]): - """ - - location: Union[Unset, str] = UNSET - service_principal_app_id: Union[Unset, str] = UNSET - service_principal_password: Union[Unset, str] = UNSET - subscription_id: Union[Unset, str] = UNSET - subscription_tenant_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - location = self.location - - service_principal_app_id = self.service_principal_app_id - - service_principal_password = self.service_principal_password - - subscription_id = self.subscription_id - - subscription_tenant_id = self.subscription_tenant_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if location is not UNSET: - field_dict["location"] = location - if service_principal_app_id is not UNSET: - field_dict["service_principal_app_id"] = service_principal_app_id - if service_principal_password is not UNSET: - field_dict["service_principal_password"] = service_principal_password - if subscription_id is not UNSET: - field_dict["subscription_id"] = subscription_id - if subscription_tenant_id is not UNSET: - field_dict["subscription_tenant_id"] = subscription_tenant_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - location = d.pop("location", UNSET) - - service_principal_app_id = d.pop("service_principal_app_id", UNSET) - - service_principal_password = d.pop("service_principal_password", UNSET) - - subscription_id = d.pop("subscription_id", UNSET) - - subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) - - service_create_install_request_azure_account = cls( - location=location, - service_principal_app_id=service_principal_app_id, - service_principal_password=service_principal_password, - subscription_id=subscription_id, - subscription_tenant_id=subscription_tenant_id, - ) - - service_create_install_request_azure_account.additional_properties = d - return service_create_install_request_azure_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_install_request_inputs.py b/nuon/models/service_create_install_request_inputs.py deleted file mode 100644 index c7b521e7..00000000 --- a/nuon/models/service_create_install_request_inputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateInstallRequestInputs") - - -@_attrs_define -class ServiceCreateInstallRequestInputs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_install_request_inputs = cls() - - service_create_install_request_inputs.additional_properties = d - return service_create_install_request_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_installer_request.py b/nuon/models/service_create_installer_request.py deleted file mode 100644 index dcf6c0e1..00000000 --- a/nuon/models/service_create_installer_request.py +++ /dev/null @@ -1,91 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata - - -T = TypeVar("T", bound="ServiceCreateInstallerRequest") - - -@_attrs_define -class ServiceCreateInstallerRequest: - """ - Attributes: - app_ids (list[str]): - name (str): - metadata (Union[Unset, ServiceCreateInstallerRequestMetadata]): - """ - - app_ids: list[str] - name: str - metadata: Union[Unset, "ServiceCreateInstallerRequestMetadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_ids = self.app_ids - - name = self.name - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_ids": app_ids, - "name": name, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata - - d = dict(src_dict) - app_ids = cast(list[str], d.pop("app_ids")) - - name = d.pop("name") - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, ServiceCreateInstallerRequestMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = ServiceCreateInstallerRequestMetadata.from_dict(_metadata) - - service_create_installer_request = cls( - app_ids=app_ids, - name=name, - metadata=metadata, - ) - - service_create_installer_request.additional_properties = d - return service_create_installer_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_installer_request_metadata.py b/nuon/models/service_create_installer_request_metadata.py deleted file mode 100644 index 97c26002..00000000 --- a/nuon/models/service_create_installer_request_metadata.py +++ /dev/null @@ -1,154 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateInstallerRequestMetadata") - - -@_attrs_define -class ServiceCreateInstallerRequestMetadata: - """ - Attributes: - community_url (str): - description (str): - documentation_url (str): - favicon_url (str): - github_url (str): - homepage_url (str): - logo_url (str): - copyright_markdown (Union[Unset, str]): - demo_url (Union[Unset, str]): - footer_markdown (Union[Unset, str]): - og_image_url (Union[Unset, str]): - post_install_markdown (Union[Unset, str]): - """ - - community_url: str - description: str - documentation_url: str - favicon_url: str - github_url: str - homepage_url: str - logo_url: str - copyright_markdown: Union[Unset, str] = UNSET - demo_url: Union[Unset, str] = UNSET - footer_markdown: Union[Unset, str] = UNSET - og_image_url: Union[Unset, str] = UNSET - post_install_markdown: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - community_url = self.community_url - - description = self.description - - documentation_url = self.documentation_url - - favicon_url = self.favicon_url - - github_url = self.github_url - - homepage_url = self.homepage_url - - logo_url = self.logo_url - - copyright_markdown = self.copyright_markdown - - demo_url = self.demo_url - - footer_markdown = self.footer_markdown - - og_image_url = self.og_image_url - - post_install_markdown = self.post_install_markdown - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "community_url": community_url, - "description": description, - "documentation_url": documentation_url, - "favicon_url": favicon_url, - "github_url": github_url, - "homepage_url": homepage_url, - "logo_url": logo_url, - } - ) - if copyright_markdown is not UNSET: - field_dict["copyright_markdown"] = copyright_markdown - if demo_url is not UNSET: - field_dict["demo_url"] = demo_url - if footer_markdown is not UNSET: - field_dict["footer_markdown"] = footer_markdown - if og_image_url is not UNSET: - field_dict["og_image_url"] = og_image_url - if post_install_markdown is not UNSET: - field_dict["post_install_markdown"] = post_install_markdown - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - community_url = d.pop("community_url") - - description = d.pop("description") - - documentation_url = d.pop("documentation_url") - - favicon_url = d.pop("favicon_url") - - github_url = d.pop("github_url") - - homepage_url = d.pop("homepage_url") - - logo_url = d.pop("logo_url") - - copyright_markdown = d.pop("copyright_markdown", UNSET) - - demo_url = d.pop("demo_url", UNSET) - - footer_markdown = d.pop("footer_markdown", UNSET) - - og_image_url = d.pop("og_image_url", UNSET) - - post_install_markdown = d.pop("post_install_markdown", UNSET) - - service_create_installer_request_metadata = cls( - community_url=community_url, - description=description, - documentation_url=documentation_url, - favicon_url=favicon_url, - github_url=github_url, - homepage_url=homepage_url, - logo_url=logo_url, - copyright_markdown=copyright_markdown, - demo_url=demo_url, - footer_markdown=footer_markdown, - og_image_url=og_image_url, - post_install_markdown=post_install_markdown, - ) - - service_create_installer_request_metadata.additional_properties = d - return service_create_installer_request_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/nuon/models/service_create_job_component_config_request.py b/nuon/models/service_create_job_component_config_request.py deleted file mode 100644 index dff977a7..00000000 --- a/nuon/models/service_create_job_component_config_request.py +++ /dev/null @@ -1,146 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_create_job_component_config_request_env_vars import ( - ServiceCreateJobComponentConfigRequestEnvVars, - ) - - -T = TypeVar("T", bound="ServiceCreateJobComponentConfigRequest") - - -@_attrs_define -class ServiceCreateJobComponentConfigRequest: - """ - Attributes: - image_url (str): - tag (str): - app_config_id (Union[Unset, str]): - args (Union[Unset, list[str]]): - checksum (Union[Unset, str]): - cmd (Union[Unset, list[str]]): - env_vars (Union[Unset, ServiceCreateJobComponentConfigRequestEnvVars]): - references (Union[Unset, list[str]]): - """ - - image_url: str - tag: str - app_config_id: Union[Unset, str] = UNSET - args: Union[Unset, list[str]] = UNSET - checksum: Union[Unset, str] = UNSET - cmd: Union[Unset, list[str]] = UNSET - env_vars: Union[Unset, "ServiceCreateJobComponentConfigRequestEnvVars"] = UNSET - references: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - image_url = self.image_url - - tag = self.tag - - app_config_id = self.app_config_id - - args: Union[Unset, list[str]] = UNSET - if not isinstance(self.args, Unset): - args = self.args - - checksum = self.checksum - - cmd: Union[Unset, list[str]] = UNSET - if not isinstance(self.cmd, Unset): - cmd = self.cmd - - env_vars: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = self.env_vars.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "image_url": image_url, - "tag": tag, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if args is not UNSET: - field_dict["args"] = args - if checksum is not UNSET: - field_dict["checksum"] = checksum - if cmd is not UNSET: - field_dict["cmd"] = cmd - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if references is not UNSET: - field_dict["references"] = references - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_create_job_component_config_request_env_vars import ( - ServiceCreateJobComponentConfigRequestEnvVars, - ) - - d = dict(src_dict) - image_url = d.pop("image_url") - - tag = d.pop("tag") - - app_config_id = d.pop("app_config_id", UNSET) - - args = cast(list[str], d.pop("args", UNSET)) - - checksum = d.pop("checksum", UNSET) - - cmd = cast(list[str], d.pop("cmd", UNSET)) - - _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateJobComponentConfigRequestEnvVars] - if isinstance(_env_vars, Unset): - env_vars = UNSET - else: - env_vars = ServiceCreateJobComponentConfigRequestEnvVars.from_dict(_env_vars) - - references = cast(list[str], d.pop("references", UNSET)) - - service_create_job_component_config_request = cls( - image_url=image_url, - tag=tag, - app_config_id=app_config_id, - args=args, - checksum=checksum, - cmd=cmd, - env_vars=env_vars, - references=references, - ) - - service_create_job_component_config_request.additional_properties = d - return service_create_job_component_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_job_component_config_request_env_vars.py b/nuon/models/service_create_job_component_config_request_env_vars.py deleted file mode 100644 index dd284a70..00000000 --- a/nuon/models/service_create_job_component_config_request_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateJobComponentConfigRequestEnvVars") - - -@_attrs_define -class ServiceCreateJobComponentConfigRequestEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_job_component_config_request_env_vars = cls() - - service_create_job_component_config_request_env_vars.additional_properties = d - return service_create_job_component_config_request_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_kubernetes_manifest_component_config_request.py b/nuon/models/service_create_kubernetes_manifest_component_config_request.py deleted file mode 100644 index fc5ed464..00000000 --- a/nuon/models/service_create_kubernetes_manifest_component_config_request.py +++ /dev/null @@ -1,108 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateKubernetesManifestComponentConfigRequest") - - -@_attrs_define -class ServiceCreateKubernetesManifestComponentConfigRequest: - """ - Attributes: - app_config_id (Union[Unset, str]): - checksum (Union[Unset, str]): - dependencies (Union[Unset, list[str]]): - manifest (Union[Unset, str]): - namespace (Union[Unset, str]): - references (Union[Unset, list[str]]): - """ - - app_config_id: Union[Unset, str] = UNSET - checksum: Union[Unset, str] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - manifest: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - references: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_config_id = self.app_config_id - - checksum = self.checksum - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - manifest = self.manifest - - namespace = self.namespace - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if checksum is not UNSET: - field_dict["checksum"] = checksum - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if manifest is not UNSET: - field_dict["manifest"] = manifest - if namespace is not UNSET: - field_dict["namespace"] = namespace - if references is not UNSET: - field_dict["references"] = references - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_config_id = d.pop("app_config_id", UNSET) - - checksum = d.pop("checksum", UNSET) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - manifest = d.pop("manifest", UNSET) - - namespace = d.pop("namespace", UNSET) - - references = cast(list[str], d.pop("references", UNSET)) - - service_create_kubernetes_manifest_component_config_request = cls( - app_config_id=app_config_id, - checksum=checksum, - dependencies=dependencies, - manifest=manifest, - namespace=namespace, - references=references, - ) - - service_create_kubernetes_manifest_component_config_request.additional_properties = d - return service_create_kubernetes_manifest_component_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_org_invite_request.py b/nuon/models/service_create_org_invite_request.py deleted file mode 100644 index 74696684..00000000 --- a/nuon/models/service_create_org_invite_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateOrgInviteRequest") - - -@_attrs_define -class ServiceCreateOrgInviteRequest: - """ - Attributes: - email (str): - """ - - email: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - email = self.email - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "email": email, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - email = d.pop("email") - - service_create_org_invite_request = cls( - email=email, - ) - - service_create_org_invite_request.additional_properties = d - return service_create_org_invite_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_org_request.py b/nuon/models/service_create_org_request.py deleted file mode 100644 index 62816b52..00000000 --- a/nuon/models/service_create_org_request.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateOrgRequest") - - -@_attrs_define -class ServiceCreateOrgRequest: - """ - Attributes: - name (str): - use_sandbox_mode (Union[Unset, bool]): These fields are used to control the behaviour of the org. - """ - - name: str - use_sandbox_mode: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - use_sandbox_mode = self.use_sandbox_mode - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if use_sandbox_mode is not UNSET: - field_dict["use_sandbox_mode"] = use_sandbox_mode - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - use_sandbox_mode = d.pop("use_sandbox_mode", UNSET) - - service_create_org_request = cls( - name=name, - use_sandbox_mode=use_sandbox_mode, - ) - - service_create_org_request.additional_properties = d - return service_create_org_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_org_user_request.py b/nuon/models/service_create_org_user_request.py deleted file mode 100644 index 74b3bf80..00000000 --- a/nuon/models/service_create_org_user_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateOrgUserRequest") - - -@_attrs_define -class ServiceCreateOrgUserRequest: - """ - Attributes: - user_id (Union[Unset, str]): - """ - - user_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - user_id = self.user_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if user_id is not UNSET: - field_dict["user_id"] = user_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - user_id = d.pop("user_id", UNSET) - - service_create_org_user_request = cls( - user_id=user_id, - ) - - service_create_org_user_request.additional_properties = d - return service_create_org_user_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_module_component_config_request.py b/nuon/models/service_create_terraform_module_component_config_request.py deleted file mode 100644 index 8239e431..00000000 --- a/nuon/models/service_create_terraform_module_component_config_request.py +++ /dev/null @@ -1,181 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest - from ..models.service_create_terraform_module_component_config_request_env_vars import ( - ServiceCreateTerraformModuleComponentConfigRequestEnvVars, - ) - from ..models.service_create_terraform_module_component_config_request_variables import ( - ServiceCreateTerraformModuleComponentConfigRequestVariables, - ) - from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest - - -T = TypeVar("T", bound="ServiceCreateTerraformModuleComponentConfigRequest") - - -@_attrs_define -class ServiceCreateTerraformModuleComponentConfigRequest: - """ - Attributes: - env_vars (ServiceCreateTerraformModuleComponentConfigRequestEnvVars): - variables (ServiceCreateTerraformModuleComponentConfigRequestVariables): - app_config_id (Union[Unset, str]): - checksum (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): - dependencies (Union[Unset, list[str]]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): - references (Union[Unset, list[str]]): - variables_files (Union[Unset, list[str]]): - version (Union[Unset, str]): - """ - - env_vars: "ServiceCreateTerraformModuleComponentConfigRequestEnvVars" - variables: "ServiceCreateTerraformModuleComponentConfigRequestVariables" - app_config_id: Union[Unset, str] = UNSET - checksum: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET - references: Union[Unset, list[str]] = UNSET - variables_files: Union[Unset, list[str]] = UNSET - version: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - env_vars = self.env_vars.to_dict() - - variables = self.variables.to_dict() - - app_config_id = self.app_config_id - - checksum = self.checksum - - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.connected_github_vcs_config, Unset): - connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.public_git_vcs_config, Unset): - public_git_vcs_config = self.public_git_vcs_config.to_dict() - - references: Union[Unset, list[str]] = UNSET - if not isinstance(self.references, Unset): - references = self.references - - variables_files: Union[Unset, list[str]] = UNSET - if not isinstance(self.variables_files, Unset): - variables_files = self.variables_files - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "env_vars": env_vars, - "variables": variables, - } - ) - if app_config_id is not UNSET: - field_dict["app_config_id"] = app_config_id - if checksum is not UNSET: - field_dict["checksum"] = checksum - if connected_github_vcs_config is not UNSET: - field_dict["connected_github_vcs_config"] = connected_github_vcs_config - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if public_git_vcs_config is not UNSET: - field_dict["public_git_vcs_config"] = public_git_vcs_config - if references is not UNSET: - field_dict["references"] = references - if variables_files is not UNSET: - field_dict["variables_files"] = variables_files - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest - from ..models.service_create_terraform_module_component_config_request_env_vars import ( - ServiceCreateTerraformModuleComponentConfigRequestEnvVars, - ) - from ..models.service_create_terraform_module_component_config_request_variables import ( - ServiceCreateTerraformModuleComponentConfigRequestVariables, - ) - from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest - - d = dict(src_dict) - env_vars = ServiceCreateTerraformModuleComponentConfigRequestEnvVars.from_dict(d.pop("env_vars")) - - variables = ServiceCreateTerraformModuleComponentConfigRequestVariables.from_dict(d.pop("variables")) - - app_config_id = d.pop("app_config_id", UNSET) - - checksum = d.pop("checksum", UNSET) - - _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] - if isinstance(_connected_github_vcs_config, Unset): - connected_github_vcs_config = UNSET - else: - connected_github_vcs_config = ServiceConnectedGithubVCSConfigRequest.from_dict(_connected_github_vcs_config) - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] - if isinstance(_public_git_vcs_config, Unset): - public_git_vcs_config = UNSET - else: - public_git_vcs_config = ServicePublicGitVCSConfigRequest.from_dict(_public_git_vcs_config) - - references = cast(list[str], d.pop("references", UNSET)) - - variables_files = cast(list[str], d.pop("variables_files", UNSET)) - - version = d.pop("version", UNSET) - - service_create_terraform_module_component_config_request = cls( - env_vars=env_vars, - variables=variables, - app_config_id=app_config_id, - checksum=checksum, - connected_github_vcs_config=connected_github_vcs_config, - dependencies=dependencies, - public_git_vcs_config=public_git_vcs_config, - references=references, - variables_files=variables_files, - version=version, - ) - - service_create_terraform_module_component_config_request.additional_properties = d - return service_create_terraform_module_component_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_module_component_config_request_env_vars.py b/nuon/models/service_create_terraform_module_component_config_request_env_vars.py deleted file mode 100644 index 38979419..00000000 --- a/nuon/models/service_create_terraform_module_component_config_request_env_vars.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateTerraformModuleComponentConfigRequestEnvVars") - - -@_attrs_define -class ServiceCreateTerraformModuleComponentConfigRequestEnvVars: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_terraform_module_component_config_request_env_vars = cls() - - service_create_terraform_module_component_config_request_env_vars.additional_properties = d - return service_create_terraform_module_component_config_request_env_vars - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_module_component_config_request_variables.py b/nuon/models/service_create_terraform_module_component_config_request_variables.py deleted file mode 100644 index 0842ad89..00000000 --- a/nuon/models/service_create_terraform_module_component_config_request_variables.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateTerraformModuleComponentConfigRequestVariables") - - -@_attrs_define -class ServiceCreateTerraformModuleComponentConfigRequestVariables: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_create_terraform_module_component_config_request_variables = cls() - - service_create_terraform_module_component_config_request_variables.additional_properties = d - return service_create_terraform_module_component_config_request_variables - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_workspace_request.py b/nuon/models/service_create_terraform_workspace_request.py deleted file mode 100644 index 9de9b3f8..00000000 --- a/nuon/models/service_create_terraform_workspace_request.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceCreateTerraformWorkspaceRequest") - - -@_attrs_define -class ServiceCreateTerraformWorkspaceRequest: - """ - Attributes: - owner_id (str): - owner_type (str): - """ - - owner_id: str - owner_type: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - owner_id = self.owner_id - - owner_type = self.owner_type - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "owner_id": owner_id, - "owner_type": owner_type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - owner_id = d.pop("owner_id") - - owner_type = d.pop("owner_type") - - service_create_terraform_workspace_request = cls( - owner_id=owner_id, - owner_type=owner_type, - ) - - service_create_terraform_workspace_request.additional_properties = d - return service_create_terraform_workspace_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_create_workflow_step_approval_response_request.py b/nuon/models/service_create_workflow_step_approval_response_request.py deleted file mode 100644 index 0e733f57..00000000 --- a/nuon/models/service_create_workflow_step_approval_response_request.py +++ /dev/null @@ -1,76 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_workflow_step_response_type import AppWorkflowStepResponseType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceCreateWorkflowStepApprovalResponseRequest") - - -@_attrs_define -class ServiceCreateWorkflowStepApprovalResponseRequest: - """ - Attributes: - note (Union[Unset, str]): - response_type (Union[Unset, AppWorkflowStepResponseType]): - """ - - note: Union[Unset, str] = UNSET - response_type: Union[Unset, AppWorkflowStepResponseType] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - note = self.note - - response_type: Union[Unset, str] = UNSET - if not isinstance(self.response_type, Unset): - response_type = self.response_type.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if note is not UNSET: - field_dict["note"] = note - if response_type is not UNSET: - field_dict["response_type"] = response_type - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - note = d.pop("note", UNSET) - - _response_type = d.pop("response_type", UNSET) - response_type: Union[Unset, AppWorkflowStepResponseType] - if isinstance(_response_type, Unset): - response_type = UNSET - else: - response_type = AppWorkflowStepResponseType(_response_type) - - service_create_workflow_step_approval_response_request = cls( - note=note, - response_type=response_type, - ) - - service_create_workflow_step_approval_response_request.additional_properties = d - return service_create_workflow_step_approval_response_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_deploy_install_components_request.py b/nuon/models/service_deploy_install_components_request.py deleted file mode 100644 index 08be2f8f..00000000 --- a/nuon/models/service_deploy_install_components_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceDeployInstallComponentsRequest") - - -@_attrs_define -class ServiceDeployInstallComponentsRequest: - """ - Attributes: - plan_only (Union[Unset, bool]): - """ - - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plan_only = d.pop("plan_only", UNSET) - - service_deploy_install_components_request = cls( - plan_only=plan_only, - ) - - service_deploy_install_components_request.additional_properties = d - return service_deploy_install_components_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_deprovision_install_request.py b/nuon/models/service_deprovision_install_request.py deleted file mode 100644 index 868b932b..00000000 --- a/nuon/models/service_deprovision_install_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceDeprovisionInstallRequest") - - -@_attrs_define -class ServiceDeprovisionInstallRequest: - """ - Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): - """ - - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - error_behavior = self.error_behavior - - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_behavior is not UNSET: - field_dict["error_behavior"] = error_behavior - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - error_behavior = d.pop("error_behavior", UNSET) - - plan_only = d.pop("plan_only", UNSET) - - service_deprovision_install_request = cls( - error_behavior=error_behavior, - plan_only=plan_only, - ) - - service_deprovision_install_request.additional_properties = d - return service_deprovision_install_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_deprovision_install_sandbox_request.py b/nuon/models/service_deprovision_install_sandbox_request.py deleted file mode 100644 index 79a56d8f..00000000 --- a/nuon/models/service_deprovision_install_sandbox_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceDeprovisionInstallSandboxRequest") - - -@_attrs_define -class ServiceDeprovisionInstallSandboxRequest: - """ - Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): - """ - - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - error_behavior = self.error_behavior - - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_behavior is not UNSET: - field_dict["error_behavior"] = error_behavior - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - error_behavior = d.pop("error_behavior", UNSET) - - plan_only = d.pop("plan_only", UNSET) - - service_deprovision_install_sandbox_request = cls( - error_behavior=error_behavior, - plan_only=plan_only, - ) - - service_deprovision_install_sandbox_request.additional_properties = d - return service_deprovision_install_sandbox_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_force_shutdown_request.py b/nuon/models/service_force_shutdown_request.py deleted file mode 100644 index 1517d85e..00000000 --- a/nuon/models/service_force_shutdown_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceForceShutdownRequest") - - -@_attrs_define -class ServiceForceShutdownRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_force_shutdown_request = cls() - - service_force_shutdown_request.additional_properties = d - return service_force_shutdown_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_forget_install_request.py b/nuon/models/service_forget_install_request.py deleted file mode 100644 index 2ced5716..00000000 --- a/nuon/models/service_forget_install_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceForgetInstallRequest") - - -@_attrs_define -class ServiceForgetInstallRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_forget_install_request = cls() - - service_forget_install_request.additional_properties = d - return service_forget_install_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_graceful_shutdown_request.py b/nuon/models/service_graceful_shutdown_request.py deleted file mode 100644 index c99751f0..00000000 --- a/nuon/models/service_graceful_shutdown_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceGracefulShutdownRequest") - - -@_attrs_define -class ServiceGracefulShutdownRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_graceful_shutdown_request = cls() - - service_graceful_shutdown_request.additional_properties = d - return service_graceful_shutdown_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_install_phone_home_request.py b/nuon/models/service_install_phone_home_request.py deleted file mode 100644 index cad5630f..00000000 --- a/nuon/models/service_install_phone_home_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceInstallPhoneHomeRequest") - - -@_attrs_define -class ServiceInstallPhoneHomeRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_install_phone_home_request = cls() - - service_install_phone_home_request.additional_properties = d - return service_install_phone_home_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_mng_shut_down_request.py b/nuon/models/service_mng_shut_down_request.py deleted file mode 100644 index 6bd0f457..00000000 --- a/nuon/models/service_mng_shut_down_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceMngShutDownRequest") - - -@_attrs_define -class ServiceMngShutDownRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_mng_shut_down_request = cls() - - service_mng_shut_down_request.additional_properties = d - return service_mng_shut_down_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_mng_update_request.py b/nuon/models/service_mng_update_request.py deleted file mode 100644 index bede9163..00000000 --- a/nuon/models/service_mng_update_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceMngUpdateRequest") - - -@_attrs_define -class ServiceMngUpdateRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_mng_update_request = cls() - - service_mng_update_request.additional_properties = d - return service_mng_update_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_mng_vm_shut_down_request.py b/nuon/models/service_mng_vm_shut_down_request.py deleted file mode 100644 index 47313084..00000000 --- a/nuon/models/service_mng_vm_shut_down_request.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceMngVMShutDownRequest") - - -@_attrs_define -class ServiceMngVMShutDownRequest: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_mng_vm_shut_down_request = cls() - - service_mng_vm_shut_down_request.additional_properties = d - return service_mng_vm_shut_down_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_public_git_vcs_action_workflow_config_request.py b/nuon/models/service_public_git_vcs_action_workflow_config_request.py deleted file mode 100644 index 5f2ee9b4..00000000 --- a/nuon/models/service_public_git_vcs_action_workflow_config_request.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServicePublicGitVCSActionWorkflowConfigRequest") - - -@_attrs_define -class ServicePublicGitVCSActionWorkflowConfigRequest: - """ - Attributes: - branch (str): - directory (str): - repo (str): - """ - - branch: str - directory: str - repo: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - directory = self.directory - - repo = self.repo - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "branch": branch, - "directory": directory, - "repo": repo, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch") - - directory = d.pop("directory") - - repo = d.pop("repo") - - service_public_git_vcs_action_workflow_config_request = cls( - branch=branch, - directory=directory, - repo=repo, - ) - - service_public_git_vcs_action_workflow_config_request.additional_properties = d - return service_public_git_vcs_action_workflow_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_public_git_vcs_config_request.py b/nuon/models/service_public_git_vcs_config_request.py deleted file mode 100644 index 6c545a4b..00000000 --- a/nuon/models/service_public_git_vcs_config_request.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServicePublicGitVCSConfigRequest") - - -@_attrs_define -class ServicePublicGitVCSConfigRequest: - """ - Attributes: - branch (str): - directory (str): - repo (str): - """ - - branch: str - directory: str - repo: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - directory = self.directory - - repo = self.repo - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "branch": branch, - "directory": directory, - "repo": repo, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch") - - directory = d.pop("directory") - - repo = d.pop("repo") - - service_public_git_vcs_config_request = cls( - branch=branch, - directory=directory, - repo=repo, - ) - - service_public_git_vcs_config_request.additional_properties = d - return service_public_git_vcs_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_public_git_vcs_sandbox_config_request.py b/nuon/models/service_public_git_vcs_sandbox_config_request.py deleted file mode 100644 index ae5f0246..00000000 --- a/nuon/models/service_public_git_vcs_sandbox_config_request.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServicePublicGitVCSSandboxConfigRequest") - - -@_attrs_define -class ServicePublicGitVCSSandboxConfigRequest: - """ - Attributes: - branch (str): - directory (str): - repo (str): - """ - - branch: str - directory: str - repo: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - directory = self.directory - - repo = self.repo - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "branch": branch, - "directory": directory, - "repo": repo, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch") - - directory = d.pop("directory") - - repo = d.pop("repo") - - service_public_git_vcs_sandbox_config_request = cls( - branch=branch, - directory=directory, - repo=repo, - ) - - service_public_git_vcs_sandbox_config_request.additional_properties = d - return service_public_git_vcs_sandbox_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_readme.py b/nuon/models/service_readme.py deleted file mode 100644 index c7bf1790..00000000 --- a/nuon/models/service_readme.py +++ /dev/null @@ -1,79 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceReadme") - - -@_attrs_define -class ServiceReadme: - """ - Attributes: - original (Union[Unset, str]): - readme (Union[Unset, str]): - warnings (Union[Unset, list[str]]): - """ - - original: Union[Unset, str] = UNSET - readme: Union[Unset, str] = UNSET - warnings: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - original = self.original - - readme = self.readme - - warnings: Union[Unset, list[str]] = UNSET - if not isinstance(self.warnings, Unset): - warnings = self.warnings - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if original is not UNSET: - field_dict["original"] = original - if readme is not UNSET: - field_dict["readme"] = readme - if warnings is not UNSET: - field_dict["warnings"] = warnings - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - original = d.pop("original", UNSET) - - readme = d.pop("readme", UNSET) - - warnings = cast(list[str], d.pop("warnings", UNSET)) - - service_readme = cls( - original=original, - readme=readme, - warnings=warnings, - ) - - service_readme.additional_properties = d - return service_readme - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_remove_org_user_request.py b/nuon/models/service_remove_org_user_request.py deleted file mode 100644 index 196e72bd..00000000 --- a/nuon/models/service_remove_org_user_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceRemoveOrgUserRequest") - - -@_attrs_define -class ServiceRemoveOrgUserRequest: - """ - Attributes: - user_id (Union[Unset, str]): - """ - - user_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - user_id = self.user_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if user_id is not UNSET: - field_dict["user_id"] = user_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - user_id = d.pop("user_id", UNSET) - - service_remove_org_user_request = cls( - user_id=user_id, - ) - - service_remove_org_user_request.additional_properties = d - return service_remove_org_user_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_rendered_installer.py b/nuon/models/service_rendered_installer.py deleted file mode 100644 index 396d910a..00000000 --- a/nuon/models/service_rendered_installer.py +++ /dev/null @@ -1,102 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.app_app import AppApp - from ..models.app_installer_metadata import AppInstallerMetadata - - -T = TypeVar("T", bound="ServiceRenderedInstaller") - - -@_attrs_define -class ServiceRenderedInstaller: - """ - Attributes: - apps (Union[Unset, list['AppApp']]): - metadata (Union[Unset, AppInstallerMetadata]): - sandbox_mode (Union[Unset, bool]): - """ - - apps: Union[Unset, list["AppApp"]] = UNSET - metadata: Union[Unset, "AppInstallerMetadata"] = UNSET - sandbox_mode: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - apps: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.apps, Unset): - apps = [] - for apps_item_data in self.apps: - apps_item = apps_item_data.to_dict() - apps.append(apps_item) - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - sandbox_mode = self.sandbox_mode - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if apps is not UNSET: - field_dict["apps"] = apps - if metadata is not UNSET: - field_dict["metadata"] = metadata - if sandbox_mode is not UNSET: - field_dict["sandbox_mode"] = sandbox_mode - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_app import AppApp - from ..models.app_installer_metadata import AppInstallerMetadata - - d = dict(src_dict) - apps = [] - _apps = d.pop("apps", UNSET) - for apps_item_data in _apps or []: - apps_item = AppApp.from_dict(apps_item_data) - - apps.append(apps_item) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppInstallerMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = AppInstallerMetadata.from_dict(_metadata) - - sandbox_mode = d.pop("sandbox_mode", UNSET) - - service_rendered_installer = cls( - apps=apps, - metadata=metadata, - sandbox_mode=sandbox_mode, - ) - - service_rendered_installer.additional_properties = d - return service_rendered_installer - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_reprovision_install_request.py b/nuon/models/service_reprovision_install_request.py deleted file mode 100644 index 19521696..00000000 --- a/nuon/models/service_reprovision_install_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceReprovisionInstallRequest") - - -@_attrs_define -class ServiceReprovisionInstallRequest: - """ - Attributes: - plan_only (Union[Unset, bool]): - """ - - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plan_only = d.pop("plan_only", UNSET) - - service_reprovision_install_request = cls( - plan_only=plan_only, - ) - - service_reprovision_install_request.additional_properties = d - return service_reprovision_install_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_reprovision_install_sandbox_request.py b/nuon/models/service_reprovision_install_sandbox_request.py deleted file mode 100644 index 1740843b..00000000 --- a/nuon/models/service_reprovision_install_sandbox_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceReprovisionInstallSandboxRequest") - - -@_attrs_define -class ServiceReprovisionInstallSandboxRequest: - """ - Attributes: - plan_only (Union[Unset, bool]): - """ - - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plan_only = d.pop("plan_only", UNSET) - - service_reprovision_install_sandbox_request = cls( - plan_only=plan_only, - ) - - service_reprovision_install_sandbox_request.additional_properties = d - return service_reprovision_install_sandbox_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_retry_workflow_by_id_request.py b/nuon/models/service_retry_workflow_by_id_request.py deleted file mode 100644 index 862f14f0..00000000 --- a/nuon/models/service_retry_workflow_by_id_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceRetryWorkflowByIDRequest") - - -@_attrs_define -class ServiceRetryWorkflowByIDRequest: - """ - Attributes: - operation (Union[Unset, str]): Retry indicates whether to retry the current step or not - step_id (Union[Unset, str]): StepID is the ID of the step to start the retry from - """ - - operation: Union[Unset, str] = UNSET - step_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - operation = self.operation - - step_id = self.step_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if operation is not UNSET: - field_dict["operation"] = operation - if step_id is not UNSET: - field_dict["step_id"] = step_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - operation = d.pop("operation", UNSET) - - step_id = d.pop("step_id", UNSET) - - service_retry_workflow_by_id_request = cls( - operation=operation, - step_id=step_id, - ) - - service_retry_workflow_by_id_request.additional_properties = d - return service_retry_workflow_by_id_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_retry_workflow_by_id_response.py b/nuon/models/service_retry_workflow_by_id_response.py deleted file mode 100644 index dc310ac0..00000000 --- a/nuon/models/service_retry_workflow_by_id_response.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceRetryWorkflowByIDResponse") - - -@_attrs_define -class ServiceRetryWorkflowByIDResponse: - """ - Attributes: - workflow_id (Union[Unset, str]): - """ - - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - workflow_id = d.pop("workflow_id", UNSET) - - service_retry_workflow_by_id_response = cls( - workflow_id=workflow_id, - ) - - service_retry_workflow_by_id_response.additional_properties = d - return service_retry_workflow_by_id_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/nuon/models/service_retry_workflow_request.py b/nuon/models/service_retry_workflow_request.py deleted file mode 100644 index ed24f7e2..00000000 --- a/nuon/models/service_retry_workflow_request.py +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceRetryWorkflowRequest") - - -@_attrs_define -class ServiceRetryWorkflowRequest: - """ - Attributes: - operation (Union[Unset, str]): Retry indicates whether to retry the current step or not - step_id (Union[Unset, str]): StepID is the ID of the step to start the retry from - workflow_id (Union[Unset, str]): - """ - - operation: Union[Unset, str] = UNSET - step_id: Union[Unset, str] = UNSET - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - operation = self.operation - - step_id = self.step_id - - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if operation is not UNSET: - field_dict["operation"] = operation - if step_id is not UNSET: - field_dict["step_id"] = step_id - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - operation = d.pop("operation", UNSET) - - step_id = d.pop("step_id", UNSET) - - workflow_id = d.pop("workflow_id", UNSET) - - service_retry_workflow_request = cls( - operation=operation, - step_id=step_id, - workflow_id=workflow_id, - ) - - service_retry_workflow_request.additional_properties = d - return service_retry_workflow_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_retry_workflow_response.py b/nuon/models/service_retry_workflow_response.py deleted file mode 100644 index d21141fd..00000000 --- a/nuon/models/service_retry_workflow_response.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceRetryWorkflowResponse") - - -@_attrs_define -class ServiceRetryWorkflowResponse: - """ - Attributes: - workflow_id (Union[Unset, str]): - """ - - workflow_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - workflow_id = self.workflow_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if workflow_id is not UNSET: - field_dict["workflow_id"] = workflow_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - workflow_id = d.pop("workflow_id", UNSET) - - service_retry_workflow_response = cls( - workflow_id=workflow_id, - ) - - service_retry_workflow_response.additional_properties = d - return service_retry_workflow_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/nuon/models/service_runner_connection_status.py b/nuon/models/service_runner_connection_status.py deleted file mode 100644 index 74612f3b..00000000 --- a/nuon/models/service_runner_connection_status.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceRunnerConnectionStatus") - - -@_attrs_define -class ServiceRunnerConnectionStatus: - """ - Attributes: - connected (Union[Unset, bool]): - latest_heartbeat_timestamp (Union[Unset, int]): - """ - - connected: Union[Unset, bool] = UNSET - latest_heartbeat_timestamp: Union[Unset, int] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connected = self.connected - - latest_heartbeat_timestamp = self.latest_heartbeat_timestamp - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if connected is not UNSET: - field_dict["connected"] = connected - if latest_heartbeat_timestamp is not UNSET: - field_dict["latest_heartbeat_timestamp"] = latest_heartbeat_timestamp - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connected = d.pop("connected", UNSET) - - latest_heartbeat_timestamp = d.pop("latest_heartbeat_timestamp", UNSET) - - service_runner_connection_status = cls( - connected=connected, - latest_heartbeat_timestamp=latest_heartbeat_timestamp, - ) - - service_runner_connection_status.additional_properties = d - return service_runner_connection_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/nuon/models/service_sync_secrets_request.py b/nuon/models/service_sync_secrets_request.py deleted file mode 100644 index 9931f0bf..00000000 --- a/nuon/models/service_sync_secrets_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceSyncSecretsRequest") - - -@_attrs_define -class ServiceSyncSecretsRequest: - """ - Attributes: - plan_only (Union[Unset, bool]): - """ - - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plan_only = d.pop("plan_only", UNSET) - - service_sync_secrets_request = cls( - plan_only=plan_only, - ) - - service_sync_secrets_request.additional_properties = d - return service_sync_secrets_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_teardown_install_component_request.py b/nuon/models/service_teardown_install_component_request.py deleted file mode 100644 index db4d1c72..00000000 --- a/nuon/models/service_teardown_install_component_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceTeardownInstallComponentRequest") - - -@_attrs_define -class ServiceTeardownInstallComponentRequest: - """ - Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): - """ - - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - error_behavior = self.error_behavior - - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_behavior is not UNSET: - field_dict["error_behavior"] = error_behavior - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - error_behavior = d.pop("error_behavior", UNSET) - - plan_only = d.pop("plan_only", UNSET) - - service_teardown_install_component_request = cls( - error_behavior=error_behavior, - plan_only=plan_only, - ) - - service_teardown_install_component_request.additional_properties = d - return service_teardown_install_component_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_teardown_install_components_request.py b/nuon/models/service_teardown_install_components_request.py deleted file mode 100644 index e9b64781..00000000 --- a/nuon/models/service_teardown_install_components_request.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceTeardownInstallComponentsRequest") - - -@_attrs_define -class ServiceTeardownInstallComponentsRequest: - """ - Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): - """ - - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - error_behavior = self.error_behavior - - plan_only = self.plan_only - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_behavior is not UNSET: - field_dict["error_behavior"] = error_behavior - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - error_behavior = d.pop("error_behavior", UNSET) - - plan_only = d.pop("plan_only", UNSET) - - service_teardown_install_components_request = cls( - error_behavior=error_behavior, - plan_only=plan_only, - ) - - service_teardown_install_components_request.additional_properties = d - return service_teardown_install_components_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_action_workflow_request.py b/nuon/models/service_update_action_workflow_request.py deleted file mode 100644 index 7b1e2396..00000000 --- a/nuon/models/service_update_action_workflow_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateActionWorkflowRequest") - - -@_attrs_define -class ServiceUpdateActionWorkflowRequest: - """ - Attributes: - name (Union[Unset, str]): - """ - - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name", UNSET) - - service_update_action_workflow_request = cls( - name=name, - ) - - service_update_action_workflow_request.additional_properties = d - return service_update_action_workflow_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_app_config_installs_request.py b/nuon/models/service_update_app_config_installs_request.py deleted file mode 100644 index efcb0966..00000000 --- a/nuon/models/service_update_app_config_installs_request.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateAppConfigInstallsRequest") - - -@_attrs_define -class ServiceUpdateAppConfigInstallsRequest: - """ - Attributes: - install_i_ds (Union[Unset, list[str]]): - update_all (Union[Unset, bool]): - """ - - install_i_ds: Union[Unset, list[str]] = UNSET - update_all: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - install_i_ds: Union[Unset, list[str]] = UNSET - if not isinstance(self.install_i_ds, Unset): - install_i_ds = self.install_i_ds - - update_all = self.update_all - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if install_i_ds is not UNSET: - field_dict["installIDs"] = install_i_ds - if update_all is not UNSET: - field_dict["updateAll"] = update_all - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - install_i_ds = cast(list[str], d.pop("installIDs", UNSET)) - - update_all = d.pop("updateAll", UNSET) - - service_update_app_config_installs_request = cls( - install_i_ds=install_i_ds, - update_all=update_all, - ) - - service_update_app_config_installs_request.additional_properties = d - return service_update_app_config_installs_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_app_config_request.py b/nuon/models/service_update_app_config_request.py deleted file mode 100644 index 38f45104..00000000 --- a/nuon/models/service_update_app_config_request.py +++ /dev/null @@ -1,96 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_app_config_status import AppAppConfigStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateAppConfigRequest") - - -@_attrs_define -class ServiceUpdateAppConfigRequest: - """ - Attributes: - component_ids (Union[Unset, list[str]]): - state (Union[Unset, str]): - status (Union[Unset, AppAppConfigStatus]): - status_description (Union[Unset, str]): - """ - - component_ids: Union[Unset, list[str]] = UNSET - state: Union[Unset, str] = UNSET - status: Union[Unset, AppAppConfigStatus] = UNSET - status_description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - component_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.component_ids, Unset): - component_ids = self.component_ids - - state = self.state - - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status.value - - status_description = self.status_description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if component_ids is not UNSET: - field_dict["component_ids"] = component_ids - if state is not UNSET: - field_dict["state"] = state - if status is not UNSET: - field_dict["status"] = status - if status_description is not UNSET: - field_dict["status_description"] = status_description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - component_ids = cast(list[str], d.pop("component_ids", UNSET)) - - state = d.pop("state", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, AppAppConfigStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = AppAppConfigStatus(_status) - - status_description = d.pop("status_description", UNSET) - - service_update_app_config_request = cls( - component_ids=component_ids, - state=state, - status=status, - status_description=status_description, - ) - - service_update_app_config_request.additional_properties = d - return service_update_app_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_app_request.py b/nuon/models/service_update_app_request.py deleted file mode 100644 index 4c56ec99..00000000 --- a/nuon/models/service_update_app_request.py +++ /dev/null @@ -1,104 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateAppRequest") - - -@_attrs_define -class ServiceUpdateAppRequest: - """ - Attributes: - config_directory (Union[Unset, str]): - config_repo (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - name (Union[Unset, str]): - slack_webhook_url (Union[Unset, str]): - """ - - config_directory: Union[Unset, str] = UNSET - config_repo: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - slack_webhook_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - config_directory = self.config_directory - - config_repo = self.config_repo - - description = self.description - - display_name = self.display_name - - name = self.name - - slack_webhook_url = self.slack_webhook_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if config_directory is not UNSET: - field_dict["config_directory"] = config_directory - if config_repo is not UNSET: - field_dict["config_repo"] = config_repo - if description is not UNSET: - field_dict["description"] = description - if display_name is not UNSET: - field_dict["display_name"] = display_name - if name is not UNSET: - field_dict["name"] = name - if slack_webhook_url is not UNSET: - field_dict["slack_webhook_url"] = slack_webhook_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config_directory = d.pop("config_directory", UNSET) - - config_repo = d.pop("config_repo", UNSET) - - description = d.pop("description", UNSET) - - display_name = d.pop("display_name", UNSET) - - name = d.pop("name", UNSET) - - slack_webhook_url = d.pop("slack_webhook_url", UNSET) - - service_update_app_request = cls( - config_directory=config_directory, - config_repo=config_repo, - description=description, - display_name=display_name, - name=name, - slack_webhook_url=slack_webhook_url, - ) - - service_update_app_request.additional_properties = d - return service_update_app_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_component_request.py b/nuon/models/service_update_component_request.py deleted file mode 100644 index d24b2122..00000000 --- a/nuon/models/service_update_component_request.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateComponentRequest") - - -@_attrs_define -class ServiceUpdateComponentRequest: - """ - Attributes: - name (str): - dependencies (Union[Unset, list[str]]): - var_name (Union[Unset, str]): - """ - - name: str - dependencies: Union[Unset, list[str]] = UNSET - var_name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - dependencies: Union[Unset, list[str]] = UNSET - if not isinstance(self.dependencies, Unset): - dependencies = self.dependencies - - var_name = self.var_name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if dependencies is not UNSET: - field_dict["dependencies"] = dependencies - if var_name is not UNSET: - field_dict["var_name"] = var_name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - dependencies = cast(list[str], d.pop("dependencies", UNSET)) - - var_name = d.pop("var_name", UNSET) - - service_update_component_request = cls( - name=name, - dependencies=dependencies, - var_name=var_name, - ) - - service_update_component_request.additional_properties = d - return service_update_component_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_install_config_request.py b/nuon/models/service_update_install_config_request.py deleted file mode 100644 index dc94b9cd..00000000 --- a/nuon/models/service_update_install_config_request.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_approval_option import AppInstallApprovalOption -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateInstallConfigRequest") - - -@_attrs_define -class ServiceUpdateInstallConfigRequest: - """ - Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - """ - - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_option: Union[Unset, str] = UNSET - if not isinstance(self.approval_option, Unset): - approval_option = self.approval_option.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if approval_option is not UNSET: - field_dict["approval_option"] = approval_option - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - _approval_option = d.pop("approval_option", UNSET) - approval_option: Union[Unset, AppInstallApprovalOption] - if isinstance(_approval_option, Unset): - approval_option = UNSET - else: - approval_option = AppInstallApprovalOption(_approval_option) - - service_update_install_config_request = cls( - approval_option=approval_option, - ) - - service_update_install_config_request.additional_properties = d - return service_update_install_config_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_install_inputs_request.py b/nuon/models/service_update_install_inputs_request.py deleted file mode 100644 index f0d28503..00000000 --- a/nuon/models/service_update_install_inputs_request.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.service_update_install_inputs_request_inputs import ServiceUpdateInstallInputsRequestInputs - - -T = TypeVar("T", bound="ServiceUpdateInstallInputsRequest") - - -@_attrs_define -class ServiceUpdateInstallInputsRequest: - """ - Attributes: - inputs (ServiceUpdateInstallInputsRequestInputs): - """ - - inputs: "ServiceUpdateInstallInputsRequestInputs" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - inputs = self.inputs.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "inputs": inputs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_update_install_inputs_request_inputs import ServiceUpdateInstallInputsRequestInputs - - d = dict(src_dict) - inputs = ServiceUpdateInstallInputsRequestInputs.from_dict(d.pop("inputs")) - - service_update_install_inputs_request = cls( - inputs=inputs, - ) - - service_update_install_inputs_request.additional_properties = d - return service_update_install_inputs_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_install_inputs_request_inputs.py b/nuon/models/service_update_install_inputs_request_inputs.py deleted file mode 100644 index 66fc7ad4..00000000 --- a/nuon/models/service_update_install_inputs_request_inputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceUpdateInstallInputsRequestInputs") - - -@_attrs_define -class ServiceUpdateInstallInputsRequestInputs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - service_update_install_inputs_request_inputs = cls() - - service_update_install_inputs_request_inputs.additional_properties = d - return service_update_install_inputs_request_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_install_request.py b/nuon/models/service_update_install_request.py deleted file mode 100644 index 30f00e43..00000000 --- a/nuon/models/service_update_install_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateInstallRequest") - - -@_attrs_define -class ServiceUpdateInstallRequest: - """ - Attributes: - name (Union[Unset, str]): - """ - - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name", UNSET) - - service_update_install_request = cls( - name=name, - ) - - service_update_install_request.additional_properties = d - return service_update_install_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_installer_request.py b/nuon/models/service_update_installer_request.py deleted file mode 100644 index 573af4cb..00000000 --- a/nuon/models/service_update_installer_request.py +++ /dev/null @@ -1,91 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata - - -T = TypeVar("T", bound="ServiceUpdateInstallerRequest") - - -@_attrs_define -class ServiceUpdateInstallerRequest: - """ - Attributes: - app_ids (list[str]): - name (str): - metadata (Union[Unset, ServiceUpdateInstallerRequestMetadata]): - """ - - app_ids: list[str] - name: str - metadata: Union[Unset, "ServiceUpdateInstallerRequestMetadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_ids = self.app_ids - - name = self.name - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_ids": app_ids, - "name": name, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata - - d = dict(src_dict) - app_ids = cast(list[str], d.pop("app_ids")) - - name = d.pop("name") - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, ServiceUpdateInstallerRequestMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = ServiceUpdateInstallerRequestMetadata.from_dict(_metadata) - - service_update_installer_request = cls( - app_ids=app_ids, - name=name, - metadata=metadata, - ) - - service_update_installer_request.additional_properties = d - return service_update_installer_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_installer_request_metadata.py b/nuon/models/service_update_installer_request_metadata.py deleted file mode 100644 index f443e9cf..00000000 --- a/nuon/models/service_update_installer_request_metadata.py +++ /dev/null @@ -1,154 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateInstallerRequestMetadata") - - -@_attrs_define -class ServiceUpdateInstallerRequestMetadata: - """ - Attributes: - community_url (str): - description (str): - documentation_url (str): - favicon_url (str): - github_url (str): - homepage_url (str): - logo_url (str): - copyright_markdown (Union[Unset, str]): - demo_url (Union[Unset, str]): - footer_markdown (Union[Unset, str]): - og_image_url (Union[Unset, str]): - post_install_markdown (Union[Unset, str]): - """ - - community_url: str - description: str - documentation_url: str - favicon_url: str - github_url: str - homepage_url: str - logo_url: str - copyright_markdown: Union[Unset, str] = UNSET - demo_url: Union[Unset, str] = UNSET - footer_markdown: Union[Unset, str] = UNSET - og_image_url: Union[Unset, str] = UNSET - post_install_markdown: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - community_url = self.community_url - - description = self.description - - documentation_url = self.documentation_url - - favicon_url = self.favicon_url - - github_url = self.github_url - - homepage_url = self.homepage_url - - logo_url = self.logo_url - - copyright_markdown = self.copyright_markdown - - demo_url = self.demo_url - - footer_markdown = self.footer_markdown - - og_image_url = self.og_image_url - - post_install_markdown = self.post_install_markdown - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "community_url": community_url, - "description": description, - "documentation_url": documentation_url, - "favicon_url": favicon_url, - "github_url": github_url, - "homepage_url": homepage_url, - "logo_url": logo_url, - } - ) - if copyright_markdown is not UNSET: - field_dict["copyright_markdown"] = copyright_markdown - if demo_url is not UNSET: - field_dict["demo_url"] = demo_url - if footer_markdown is not UNSET: - field_dict["footer_markdown"] = footer_markdown - if og_image_url is not UNSET: - field_dict["og_image_url"] = og_image_url - if post_install_markdown is not UNSET: - field_dict["post_install_markdown"] = post_install_markdown - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - community_url = d.pop("community_url") - - description = d.pop("description") - - documentation_url = d.pop("documentation_url") - - favicon_url = d.pop("favicon_url") - - github_url = d.pop("github_url") - - homepage_url = d.pop("homepage_url") - - logo_url = d.pop("logo_url") - - copyright_markdown = d.pop("copyright_markdown", UNSET) - - demo_url = d.pop("demo_url", UNSET) - - footer_markdown = d.pop("footer_markdown", UNSET) - - og_image_url = d.pop("og_image_url", UNSET) - - post_install_markdown = d.pop("post_install_markdown", UNSET) - - service_update_installer_request_metadata = cls( - community_url=community_url, - description=description, - documentation_url=documentation_url, - favicon_url=favicon_url, - github_url=github_url, - homepage_url=homepage_url, - logo_url=logo_url, - copyright_markdown=copyright_markdown, - demo_url=demo_url, - footer_markdown=footer_markdown, - og_image_url=og_image_url, - post_install_markdown=post_install_markdown, - ) - - service_update_installer_request_metadata.additional_properties = d - return service_update_installer_request_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/nuon/models/service_update_org_request.py b/nuon/models/service_update_org_request.py deleted file mode 100644 index 6ea62635..00000000 --- a/nuon/models/service_update_org_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceUpdateOrgRequest") - - -@_attrs_define -class ServiceUpdateOrgRequest: - """ - Attributes: - name (str): - """ - - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - service_update_org_request = cls( - name=name, - ) - - service_update_org_request.additional_properties = d - return service_update_org_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_runner_settings_request.py b/nuon/models/service_update_runner_settings_request.py deleted file mode 100644 index 06a80ea1..00000000 --- a/nuon/models/service_update_runner_settings_request.py +++ /dev/null @@ -1,104 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ServiceUpdateRunnerSettingsRequest") - - -@_attrs_define -class ServiceUpdateRunnerSettingsRequest: - """ - Attributes: - aws_max_instance_lifetime (Union[Unset, int]): - container_image_tag (Union[Unset, str]): - container_image_url (Union[Unset, str]): - org_awsiam_role_arn (Union[Unset, str]): - org_k8s_service_account_name (Union[Unset, str]): - runner_api_url (Union[Unset, str]): - """ - - aws_max_instance_lifetime: Union[Unset, int] = UNSET - container_image_tag: Union[Unset, str] = UNSET - container_image_url: Union[Unset, str] = UNSET - org_awsiam_role_arn: Union[Unset, str] = UNSET - org_k8s_service_account_name: Union[Unset, str] = UNSET - runner_api_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_max_instance_lifetime = self.aws_max_instance_lifetime - - container_image_tag = self.container_image_tag - - container_image_url = self.container_image_url - - org_awsiam_role_arn = self.org_awsiam_role_arn - - org_k8s_service_account_name = self.org_k8s_service_account_name - - runner_api_url = self.runner_api_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws_max_instance_lifetime is not UNSET: - field_dict["aws_max_instance_lifetime"] = aws_max_instance_lifetime - if container_image_tag is not UNSET: - field_dict["container_image_tag"] = container_image_tag - if container_image_url is not UNSET: - field_dict["container_image_url"] = container_image_url - if org_awsiam_role_arn is not UNSET: - field_dict["org_awsiam_role_arn"] = org_awsiam_role_arn - if org_k8s_service_account_name is not UNSET: - field_dict["org_k8s_service_account_name"] = org_k8s_service_account_name - if runner_api_url is not UNSET: - field_dict["runner_api_url"] = runner_api_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - aws_max_instance_lifetime = d.pop("aws_max_instance_lifetime", UNSET) - - container_image_tag = d.pop("container_image_tag", UNSET) - - container_image_url = d.pop("container_image_url", UNSET) - - org_awsiam_role_arn = d.pop("org_awsiam_role_arn", UNSET) - - org_k8s_service_account_name = d.pop("org_k8s_service_account_name", UNSET) - - runner_api_url = d.pop("runner_api_url", UNSET) - - service_update_runner_settings_request = cls( - aws_max_instance_lifetime=aws_max_instance_lifetime, - container_image_tag=container_image_tag, - container_image_url=container_image_url, - org_awsiam_role_arn=org_awsiam_role_arn, - org_k8s_service_account_name=org_k8s_service_account_name, - runner_api_url=runner_api_url, - ) - - service_update_runner_settings_request.additional_properties = d - return service_update_runner_settings_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_update_workflow_request.py b/nuon/models/service_update_workflow_request.py deleted file mode 100644 index 45b3eaf6..00000000 --- a/nuon/models/service_update_workflow_request.py +++ /dev/null @@ -1,61 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.app_install_approval_option import AppInstallApprovalOption - -T = TypeVar("T", bound="ServiceUpdateWorkflowRequest") - - -@_attrs_define -class ServiceUpdateWorkflowRequest: - """ - Attributes: - approval_option (AppInstallApprovalOption): - """ - - approval_option: AppInstallApprovalOption - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_option = self.approval_option.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "approval_option": approval_option, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - approval_option = AppInstallApprovalOption(d.pop("approval_option")) - - service_update_workflow_request = cls( - approval_option=approval_option, - ) - - service_update_workflow_request.additional_properties = d - return service_update_workflow_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/service_waitlist_request.py b/nuon/models/service_waitlist_request.py deleted file mode 100644 index 11398956..00000000 --- a/nuon/models/service_waitlist_request.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ServiceWaitlistRequest") - - -@_attrs_define -class ServiceWaitlistRequest: - """ - Attributes: - org_name (str): - """ - - org_name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - org_name = self.org_name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "org_name": org_name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - org_name = d.pop("org_name") - - service_waitlist_request = cls( - org_name=org_name, - ) - - service_waitlist_request.additional_properties = d - return service_waitlist_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_action_workflow_state.py b/nuon/models/state_action_workflow_state.py deleted file mode 100644 index fed5232a..00000000 --- a/nuon/models/state_action_workflow_state.py +++ /dev/null @@ -1,99 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_action_workflow_state_outputs import StateActionWorkflowStateOutputs - - -T = TypeVar("T", bound="StateActionWorkflowState") - - -@_attrs_define -class StateActionWorkflowState: - """ - Attributes: - id (Union[Unset, str]): - outputs (Union[Unset, StateActionWorkflowStateOutputs]): - populated (Union[Unset, bool]): - status (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - outputs: Union[Unset, "StateActionWorkflowStateOutputs"] = UNSET - populated: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - id = self.id - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - populated = self.populated - - status = self.status - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if outputs is not UNSET: - field_dict["outputs"] = outputs - if populated is not UNSET: - field_dict["populated"] = populated - if status is not UNSET: - field_dict["status"] = status - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_action_workflow_state_outputs import StateActionWorkflowStateOutputs - - d = dict(src_dict) - id = d.pop("id", UNSET) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, StateActionWorkflowStateOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = StateActionWorkflowStateOutputs.from_dict(_outputs) - - populated = d.pop("populated", UNSET) - - status = d.pop("status", UNSET) - - state_action_workflow_state = cls( - id=id, - outputs=outputs, - populated=populated, - status=status, - ) - - state_action_workflow_state.additional_properties = d - return state_action_workflow_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_action_workflow_state_outputs.py b/nuon/models/state_action_workflow_state_outputs.py deleted file mode 100644 index 53434965..00000000 --- a/nuon/models/state_action_workflow_state_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StateActionWorkflowStateOutputs") - - -@_attrs_define -class StateActionWorkflowStateOutputs: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - state_action_workflow_state_outputs = cls() - - state_action_workflow_state_outputs.additional_properties = d - return state_action_workflow_state_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_actions_state.py b/nuon/models/state_actions_state.py deleted file mode 100644 index 27c408da..00000000 --- a/nuon/models/state_actions_state.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_actions_state_workflows import StateActionsStateWorkflows - - -T = TypeVar("T", bound="StateActionsState") - - -@_attrs_define -class StateActionsState: - """ - Attributes: - populated (Union[Unset, bool]): - workflows (Union[Unset, StateActionsStateWorkflows]): - """ - - populated: Union[Unset, bool] = UNSET - workflows: Union[Unset, "StateActionsStateWorkflows"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - populated = self.populated - - workflows: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.workflows, Unset): - workflows = self.workflows.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if populated is not UNSET: - field_dict["populated"] = populated - if workflows is not UNSET: - field_dict["workflows"] = workflows - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_actions_state_workflows import StateActionsStateWorkflows - - d = dict(src_dict) - populated = d.pop("populated", UNSET) - - _workflows = d.pop("workflows", UNSET) - workflows: Union[Unset, StateActionsStateWorkflows] - if isinstance(_workflows, Unset): - workflows = UNSET - else: - workflows = StateActionsStateWorkflows.from_dict(_workflows) - - state_actions_state = cls( - populated=populated, - workflows=workflows, - ) - - state_actions_state.additional_properties = d - return state_actions_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_actions_state_workflows.py b/nuon/models/state_actions_state_workflows.py deleted file mode 100644 index 726f05be..00000000 --- a/nuon/models/state_actions_state_workflows.py +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.state_action_workflow_state import StateActionWorkflowState - - -T = TypeVar("T", bound="StateActionsStateWorkflows") - - -@_attrs_define -class StateActionsStateWorkflows: - """ """ - - additional_properties: dict[str, "StateActionWorkflowState"] = _attrs_field(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(): - field_dict[prop_name] = prop.to_dict() - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_action_workflow_state import StateActionWorkflowState - - d = dict(src_dict) - state_actions_state_workflows = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = StateActionWorkflowState.from_dict(prop_dict) - - additional_properties[prop_name] = additional_property - - state_actions_state_workflows.additional_properties = additional_properties - return state_actions_state_workflows - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> "StateActionWorkflowState": - return self.additional_properties[key] - - def __setitem__(self, key: str, value: "StateActionWorkflowState") -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_app_state.py b/nuon/models/state_app_state.py deleted file mode 100644 index 9d78e54a..00000000 --- a/nuon/models/state_app_state.py +++ /dev/null @@ -1,108 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_app_state_secrets import StateAppStateSecrets - - -T = TypeVar("T", bound="StateAppState") - - -@_attrs_define -class StateAppState: - """ - Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): - populated (Union[Unset, bool]): - secrets (Union[Unset, StateAppStateSecrets]): - status (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - secrets: Union[Unset, "StateAppStateSecrets"] = UNSET - status: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - id = self.id - - name = self.name - - populated = self.populated - - secrets: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.secrets, Unset): - secrets = self.secrets.to_dict() - - status = self.status - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if populated is not UNSET: - field_dict["populated"] = populated - if secrets is not UNSET: - field_dict["secrets"] = secrets - if status is not UNSET: - field_dict["status"] = status - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_app_state_secrets import StateAppStateSecrets - - d = dict(src_dict) - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - populated = d.pop("populated", UNSET) - - _secrets = d.pop("secrets", UNSET) - secrets: Union[Unset, StateAppStateSecrets] - if isinstance(_secrets, Unset): - secrets = UNSET - else: - secrets = StateAppStateSecrets.from_dict(_secrets) - - status = d.pop("status", UNSET) - - state_app_state = cls( - id=id, - name=name, - populated=populated, - secrets=secrets, - status=status, - ) - - state_app_state.additional_properties = d - return state_app_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_app_state_secrets.py b/nuon/models/state_app_state_secrets.py deleted file mode 100644 index f9daabe1..00000000 --- a/nuon/models/state_app_state_secrets.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StateAppStateSecrets") - - -@_attrs_define -class StateAppStateSecrets: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - state_app_state_secrets = cls() - - state_app_state_secrets.additional_properties = d - return state_app_state_secrets - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_aws_cloud_account.py b/nuon/models/state_aws_cloud_account.py deleted file mode 100644 index a6048f0d..00000000 --- a/nuon/models/state_aws_cloud_account.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StateAWSCloudAccount") - - -@_attrs_define -class StateAWSCloudAccount: - """ - Attributes: - region (Union[Unset, str]): - """ - - region: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - region = self.region - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if region is not UNSET: - field_dict["region"] = region - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - region = d.pop("region", UNSET) - - state_aws_cloud_account = cls( - region=region, - ) - - state_aws_cloud_account.additional_properties = d - return state_aws_cloud_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_azure_cloud_account.py b/nuon/models/state_azure_cloud_account.py deleted file mode 100644 index 85b42eb3..00000000 --- a/nuon/models/state_azure_cloud_account.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StateAzureCloudAccount") - - -@_attrs_define -class StateAzureCloudAccount: - """ - Attributes: - location (Union[Unset, str]): - """ - - location: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - location = self.location - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if location is not UNSET: - field_dict["location"] = location - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - location = d.pop("location", UNSET) - - state_azure_cloud_account = cls( - location=location, - ) - - state_azure_cloud_account.additional_properties = d - return state_azure_cloud_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_cloud_account.py b/nuon/models/state_cloud_account.py deleted file mode 100644 index 515d872f..00000000 --- a/nuon/models/state_cloud_account.py +++ /dev/null @@ -1,90 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_aws_cloud_account import StateAWSCloudAccount - from ..models.state_azure_cloud_account import StateAzureCloudAccount - - -T = TypeVar("T", bound="StateCloudAccount") - - -@_attrs_define -class StateCloudAccount: - """ - Attributes: - aws (Union[Unset, StateAWSCloudAccount]): - azure (Union[Unset, StateAzureCloudAccount]): - """ - - aws: Union[Unset, "StateAWSCloudAccount"] = UNSET - azure: Union[Unset, "StateAzureCloudAccount"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.aws, Unset): - aws = self.aws.to_dict() - - azure: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.azure, Unset): - azure = self.azure.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if aws is not UNSET: - field_dict["aws"] = aws - if azure is not UNSET: - field_dict["azure"] = azure - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_aws_cloud_account import StateAWSCloudAccount - from ..models.state_azure_cloud_account import StateAzureCloudAccount - - d = dict(src_dict) - _aws = d.pop("aws", UNSET) - aws: Union[Unset, StateAWSCloudAccount] - if isinstance(_aws, Unset): - aws = UNSET - else: - aws = StateAWSCloudAccount.from_dict(_aws) - - _azure = d.pop("azure", UNSET) - azure: Union[Unset, StateAzureCloudAccount] - if isinstance(_azure, Unset): - azure = UNSET - else: - azure = StateAzureCloudAccount.from_dict(_azure) - - state_cloud_account = cls( - aws=aws, - azure=azure, - ) - - state_cloud_account.additional_properties = d - return state_cloud_account - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_domain_state.py b/nuon/models/state_domain_state.py deleted file mode 100644 index 2385b1d9..00000000 --- a/nuon/models/state_domain_state.py +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StateDomainState") - - -@_attrs_define -class StateDomainState: - """ - Attributes: - internal_domain (Union[Unset, str]): - populated (Union[Unset, bool]): - public_domain (Union[Unset, str]): - """ - - internal_domain: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - public_domain: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - internal_domain = self.internal_domain - - populated = self.populated - - public_domain = self.public_domain - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if internal_domain is not UNSET: - field_dict["internal_domain"] = internal_domain - if populated is not UNSET: - field_dict["populated"] = populated - if public_domain is not UNSET: - field_dict["public_domain"] = public_domain - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - internal_domain = d.pop("internal_domain", UNSET) - - populated = d.pop("populated", UNSET) - - public_domain = d.pop("public_domain", UNSET) - - state_domain_state = cls( - internal_domain=internal_domain, - populated=populated, - public_domain=public_domain, - ) - - state_domain_state.additional_properties = d - return state_domain_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_inputs_state.py b/nuon/models/state_inputs_state.py deleted file mode 100644 index 18cdc7a5..00000000 --- a/nuon/models/state_inputs_state.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_inputs_state_inputs import StateInputsStateInputs - - -T = TypeVar("T", bound="StateInputsState") - - -@_attrs_define -class StateInputsState: - """ - Attributes: - inputs (Union[Unset, StateInputsStateInputs]): - populated (Union[Unset, bool]): - """ - - inputs: Union[Unset, "StateInputsStateInputs"] = UNSET - populated: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - inputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.inputs, Unset): - inputs = self.inputs.to_dict() - - populated = self.populated - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if inputs is not UNSET: - field_dict["inputs"] = inputs - if populated is not UNSET: - field_dict["populated"] = populated - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_inputs_state_inputs import StateInputsStateInputs - - d = dict(src_dict) - _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, StateInputsStateInputs] - if isinstance(_inputs, Unset): - inputs = UNSET - else: - inputs = StateInputsStateInputs.from_dict(_inputs) - - populated = d.pop("populated", UNSET) - - state_inputs_state = cls( - inputs=inputs, - populated=populated, - ) - - state_inputs_state.additional_properties = d - return state_inputs_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_inputs_state_inputs.py b/nuon/models/state_inputs_state_inputs.py deleted file mode 100644 index 902962d7..00000000 --- a/nuon/models/state_inputs_state_inputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StateInputsStateInputs") - - -@_attrs_define -class StateInputsStateInputs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - state_inputs_state_inputs = cls() - - state_inputs_state_inputs.additional_properties = d - return state_inputs_state_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_install_stack_state.py b/nuon/models/state_install_stack_state.py deleted file mode 100644 index 64965cdc..00000000 --- a/nuon/models/state_install_stack_state.py +++ /dev/null @@ -1,126 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_install_stack_state_outputs import StateInstallStackStateOutputs - - -T = TypeVar("T", bound="StateInstallStackState") - - -@_attrs_define -class StateInstallStackState: - """ - Attributes: - checksum (Union[Unset, str]): - outputs (Union[Unset, StateInstallStackStateOutputs]): - populated (Union[Unset, bool]): - quick_link_url (Union[Unset, str]): - status (Union[Unset, str]): - template_json (Union[Unset, str]): - template_url (Union[Unset, str]): - """ - - checksum: Union[Unset, str] = UNSET - outputs: Union[Unset, "StateInstallStackStateOutputs"] = UNSET - populated: Union[Unset, bool] = UNSET - quick_link_url: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - template_json: Union[Unset, str] = UNSET - template_url: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - checksum = self.checksum - - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - populated = self.populated - - quick_link_url = self.quick_link_url - - status = self.status - - template_json = self.template_json - - template_url = self.template_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if checksum is not UNSET: - field_dict["checksum"] = checksum - if outputs is not UNSET: - field_dict["outputs"] = outputs - if populated is not UNSET: - field_dict["populated"] = populated - if quick_link_url is not UNSET: - field_dict["quick_link_url"] = quick_link_url - if status is not UNSET: - field_dict["status"] = status - if template_json is not UNSET: - field_dict["template_json"] = template_json - if template_url is not UNSET: - field_dict["template_url"] = template_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_install_stack_state_outputs import StateInstallStackStateOutputs - - d = dict(src_dict) - checksum = d.pop("checksum", UNSET) - - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, StateInstallStackStateOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = StateInstallStackStateOutputs.from_dict(_outputs) - - populated = d.pop("populated", UNSET) - - quick_link_url = d.pop("quick_link_url", UNSET) - - status = d.pop("status", UNSET) - - template_json = d.pop("template_json", UNSET) - - template_url = d.pop("template_url", UNSET) - - state_install_stack_state = cls( - checksum=checksum, - outputs=outputs, - populated=populated, - quick_link_url=quick_link_url, - status=status, - template_json=template_json, - template_url=template_url, - ) - - state_install_stack_state.additional_properties = d - return state_install_stack_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_install_stack_state_outputs.py b/nuon/models/state_install_stack_state_outputs.py deleted file mode 100644 index e11f07f5..00000000 --- a/nuon/models/state_install_stack_state_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StateInstallStackStateOutputs") - - -@_attrs_define -class StateInstallStackStateOutputs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - state_install_stack_state_outputs = cls() - - state_install_stack_state_outputs.additional_properties = d - return state_install_stack_state_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_install_state.py b/nuon/models/state_install_state.py deleted file mode 100644 index ef0a2974..00000000 --- a/nuon/models/state_install_state.py +++ /dev/null @@ -1,135 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_install_state_inputs import StateInstallStateInputs - from ..models.state_sandbox_state import StateSandboxState - - -T = TypeVar("T", bound="StateInstallState") - - -@_attrs_define -class StateInstallState: - """ - Attributes: - id (Union[Unset, str]): - inputs (Union[Unset, StateInstallStateInputs]): - internal_domain (Union[Unset, str]): - name (Union[Unset, str]): - populated (Union[Unset, bool]): - public_domain (Union[Unset, str]): - sandbox (Union[Unset, StateSandboxState]): - """ - - id: Union[Unset, str] = UNSET - inputs: Union[Unset, "StateInstallStateInputs"] = UNSET - internal_domain: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - public_domain: Union[Unset, str] = UNSET - sandbox: Union[Unset, "StateSandboxState"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - id = self.id - - inputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.inputs, Unset): - inputs = self.inputs.to_dict() - - internal_domain = self.internal_domain - - name = self.name - - populated = self.populated - - public_domain = self.public_domain - - sandbox: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.sandbox, Unset): - sandbox = self.sandbox.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if inputs is not UNSET: - field_dict["inputs"] = inputs - if internal_domain is not UNSET: - field_dict["internal_domain"] = internal_domain - if name is not UNSET: - field_dict["name"] = name - if populated is not UNSET: - field_dict["populated"] = populated - if public_domain is not UNSET: - field_dict["public_domain"] = public_domain - if sandbox is not UNSET: - field_dict["sandbox"] = sandbox - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_install_state_inputs import StateInstallStateInputs - from ..models.state_sandbox_state import StateSandboxState - - d = dict(src_dict) - id = d.pop("id", UNSET) - - _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, StateInstallStateInputs] - if isinstance(_inputs, Unset): - inputs = UNSET - else: - inputs = StateInstallStateInputs.from_dict(_inputs) - - internal_domain = d.pop("internal_domain", UNSET) - - name = d.pop("name", UNSET) - - populated = d.pop("populated", UNSET) - - public_domain = d.pop("public_domain", UNSET) - - _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, StateSandboxState] - if isinstance(_sandbox, Unset): - sandbox = UNSET - else: - sandbox = StateSandboxState.from_dict(_sandbox) - - state_install_state = cls( - id=id, - inputs=inputs, - internal_domain=internal_domain, - name=name, - populated=populated, - public_domain=public_domain, - sandbox=sandbox, - ) - - state_install_state.additional_properties = d - return state_install_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_install_state_inputs.py b/nuon/models/state_install_state_inputs.py deleted file mode 100644 index 8f164644..00000000 --- a/nuon/models/state_install_state_inputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StateInstallStateInputs") - - -@_attrs_define -class StateInstallStateInputs: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - state_install_state_inputs = cls() - - state_install_state_inputs.additional_properties = d - return state_install_state_inputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_org_state.py b/nuon/models/state_org_state.py deleted file mode 100644 index 0bd0eb7e..00000000 --- a/nuon/models/state_org_state.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StateOrgState") - - -@_attrs_define -class StateOrgState: - """ - Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): - populated (Union[Unset, bool]): - status (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - id = self.id - - name = self.name - - populated = self.populated - - status = self.status - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if populated is not UNSET: - field_dict["populated"] = populated - if status is not UNSET: - field_dict["status"] = status - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - populated = d.pop("populated", UNSET) - - status = d.pop("status", UNSET) - - state_org_state = cls( - id=id, - name=name, - populated=populated, - status=status, - ) - - state_org_state.additional_properties = d - return state_org_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_runner_state.py b/nuon/models/state_runner_state.py deleted file mode 100644 index 5fd73a8b..00000000 --- a/nuon/models/state_runner_state.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StateRunnerState") - - -@_attrs_define -class StateRunnerState: - """ - Attributes: - id (Union[Unset, str]): - populated (Union[Unset, bool]): - runner_group_id (Union[Unset, str]): - status (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - runner_group_id: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - id = self.id - - populated = self.populated - - runner_group_id = self.runner_group_id - - status = self.status - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if populated is not UNSET: - field_dict["populated"] = populated - if runner_group_id is not UNSET: - field_dict["runner_group_id"] = runner_group_id - if status is not UNSET: - field_dict["status"] = status - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - id = d.pop("id", UNSET) - - populated = d.pop("populated", UNSET) - - runner_group_id = d.pop("runner_group_id", UNSET) - - status = d.pop("status", UNSET) - - state_runner_state = cls( - id=id, - populated=populated, - runner_group_id=runner_group_id, - status=status, - ) - - state_runner_state.additional_properties = d - return state_runner_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_sandbox_state.py b/nuon/models/state_sandbox_state.py deleted file mode 100644 index d578415d..00000000 --- a/nuon/models/state_sandbox_state.py +++ /dev/null @@ -1,127 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.state_sandbox_state_outputs import StateSandboxStateOutputs - - -T = TypeVar("T", bound="StateSandboxState") - - -@_attrs_define -class StateSandboxState: - """ - Attributes: - outputs (Union[Unset, StateSandboxStateOutputs]): - populated (Union[Unset, bool]): - recent_runs (Union[Unset, list['StateSandboxState']]): - status (Union[Unset, str]): - type_ (Union[Unset, str]): - version (Union[Unset, str]): - """ - - outputs: Union[Unset, "StateSandboxStateOutputs"] = UNSET - populated: Union[Unset, bool] = UNSET - recent_runs: Union[Unset, list["StateSandboxState"]] = UNSET - status: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - outputs: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.outputs, Unset): - outputs = self.outputs.to_dict() - - populated = self.populated - - recent_runs: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.recent_runs, Unset): - recent_runs = [] - for recent_runs_item_data in self.recent_runs: - recent_runs_item = recent_runs_item_data.to_dict() - recent_runs.append(recent_runs_item) - - status = self.status - - type_ = self.type_ - - version = self.version - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if outputs is not UNSET: - field_dict["outputs"] = outputs - if populated is not UNSET: - field_dict["populated"] = populated - if recent_runs is not UNSET: - field_dict["recent_runs"] = recent_runs - if status is not UNSET: - field_dict["status"] = status - if type_ is not UNSET: - field_dict["type"] = type_ - if version is not UNSET: - field_dict["version"] = version - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_sandbox_state_outputs import StateSandboxStateOutputs - - d = dict(src_dict) - _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, StateSandboxStateOutputs] - if isinstance(_outputs, Unset): - outputs = UNSET - else: - outputs = StateSandboxStateOutputs.from_dict(_outputs) - - populated = d.pop("populated", UNSET) - - recent_runs = [] - _recent_runs = d.pop("recent_runs", UNSET) - for recent_runs_item_data in _recent_runs or []: - recent_runs_item = StateSandboxState.from_dict(recent_runs_item_data) - - recent_runs.append(recent_runs_item) - - status = d.pop("status", UNSET) - - type_ = d.pop("type", UNSET) - - version = d.pop("version", UNSET) - - state_sandbox_state = cls( - outputs=outputs, - populated=populated, - recent_runs=recent_runs, - status=status, - type_=type_, - version=version, - ) - - state_sandbox_state.additional_properties = d - return state_sandbox_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_sandbox_state_outputs.py b/nuon/models/state_sandbox_state_outputs.py deleted file mode 100644 index 67290aa4..00000000 --- a/nuon/models/state_sandbox_state_outputs.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StateSandboxStateOutputs") - - -@_attrs_define -class StateSandboxStateOutputs: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - state_sandbox_state_outputs = cls() - - state_sandbox_state_outputs.additional_properties = d - return state_sandbox_state_outputs - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/state_secrets_state.py b/nuon/models/state_secrets_state.py deleted file mode 100644 index 1e49f1ae..00000000 --- a/nuon/models/state_secrets_state.py +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.outputs_secret_sync_output import OutputsSecretSyncOutput - - -T = TypeVar("T", bound="StateSecretsState") - - -@_attrs_define -class StateSecretsState: - """ """ - - additional_properties: dict[str, "OutputsSecretSyncOutput"] = _attrs_field(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(): - field_dict[prop_name] = prop.to_dict() - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.outputs_secret_sync_output import OutputsSecretSyncOutput - - d = dict(src_dict) - state_secrets_state = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = OutputsSecretSyncOutput.from_dict(prop_dict) - - additional_properties[prop_name] = additional_property - - state_secrets_state.additional_properties = additional_properties - return state_secrets_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> "OutputsSecretSyncOutput": - return self.additional_properties[key] - - def __setitem__(self, key: str, value: "OutputsSecretSyncOutput") -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/nuon/models/stderr_err_response.py b/nuon/models/stderr_err_response.py deleted file mode 100644 index ed2992a3..00000000 --- a/nuon/models/stderr_err_response.py +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StderrErrResponse") - - -@_attrs_define -class StderrErrResponse: - """ - Attributes: - description (Union[Unset, str]): - error (Union[Unset, str]): - user_error (Union[Unset, bool]): - """ - - description: Union[Unset, str] = UNSET - error: Union[Unset, str] = UNSET - user_error: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - error = self.error - - user_error = self.user_error - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if description is not UNSET: - field_dict["description"] = description - if error is not UNSET: - field_dict["error"] = error - if user_error is not UNSET: - field_dict["user_error"] = user_error - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - description = d.pop("description", UNSET) - - error = d.pop("error", UNSET) - - user_error = d.pop("user_error", UNSET) - - stderr_err_response = cls( - description=description, - error=error, - user_error=user_error, - ) - - stderr_err_response.additional_properties = d - return stderr_err_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/nuon/models/types_string_bool_map.py b/nuon/models/types_string_bool_map.py deleted file mode 100644 index 1e0bb089..00000000 --- a/nuon/models/types_string_bool_map.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="TypesStringBoolMap") - - -@_attrs_define -class TypesStringBoolMap: - """ """ - - additional_properties: dict[str, bool] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - types_string_bool_map = cls() - - types_string_bool_map.additional_properties = d - return types_string_bool_map - - @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/nuon/models/unlock_terraform_workspace_body.py b/nuon/models/unlock_terraform_workspace_body.py deleted file mode 100644 index 25b7cae7..00000000 --- a/nuon/models/unlock_terraform_workspace_body.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UnlockTerraformWorkspaceBody") - - -@_attrs_define -class UnlockTerraformWorkspaceBody: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - unlock_terraform_workspace_body = cls() - - unlock_terraform_workspace_body.additional_properties = d - return unlock_terraform_workspace_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/nuon/models/update_terraform_state_body.py b/nuon/models/update_terraform_state_body.py deleted file mode 100644 index 64673d44..00000000 --- a/nuon/models/update_terraform_state_body.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateTerraformStateBody") - - -@_attrs_define -class UpdateTerraformStateBody: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - update_terraform_state_body = cls() - - update_terraform_state_body.additional_properties = d - return update_terraform_state_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/nuon/py.typed b/nuon/py.typed deleted file mode 100644 index 1aad3271..00000000 --- a/nuon/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561 \ No newline at end of file diff --git a/nuon/types.py b/nuon/types.py deleted file mode 100644 index 1b96ca40..00000000 --- a/nuon/types.py +++ /dev/null @@ -1,54 +0,0 @@ -"""Contains some shared types for properties""" - -from collections.abc import Mapping, MutableMapping -from http import HTTPStatus -from typing import IO, BinaryIO, Generic, Literal, Optional, TypeVar, Union - -from attrs import define - - -class Unset: - def __bool__(self) -> Literal[False]: - return False - - -UNSET: Unset = Unset() - -# The types that `httpx.Client(files=)` can accept, copied from that library. -FileContent = Union[IO[bytes], bytes, str] -FileTypes = Union[ - # (filename, file (or bytes), content_type) - tuple[Optional[str], FileContent, Optional[str]], - # (filename, file (or bytes), content_type, headers) - tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], -] -RequestFiles = list[tuple[str, FileTypes]] - - -@define -class File: - """Contains information for file uploads""" - - payload: BinaryIO - file_name: Optional[str] = None - mime_type: Optional[str] = None - - def to_tuple(self) -> FileTypes: - """Return a tuple representation that httpx will accept for multipart/form-data""" - return self.file_name, self.payload, self.mime_type - - -T = TypeVar("T") - - -@define -class Response(Generic[T]): - """A response from an endpoint""" - - status_code: HTTPStatus - content: bytes - headers: MutableMapping[str, str] - parsed: Optional[T] - - -__all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] diff --git a/version.txt b/version.txt deleted file mode 100644 index 20fbb5a7..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.19.619 From 2c7b3cd92edeb19b6d3992797ac97fcadc9766a6 Mon Sep 17 00:00:00 2001 From: fidiego Date: Mon, 27 Oct 2025 17:12:11 -0500 Subject: [PATCH 3/4] chore: generate --- nuon/__init__.py | 8 + nuon/api/__init__.py | 1 + nuon/api/accounts/__init__.py | 1 + nuon/api/accounts/complete_user_journey.py | 179 ++++ nuon/api/accounts/create_user_journey.py | 188 ++++ nuon/api/accounts/get_current_account.py | 147 +++ nuon/api/accounts/get_user_journeys.py | 160 ++++ nuon/api/accounts/reset_user_journey.py | 179 ++++ nuon/api/accounts/update_user_journey_step.py | 214 +++++ nuon/api/actions/__init__.py | 1 + nuon/api/actions/create_action_config.py | 206 +++++ .../actions/create_action_workflow_config.py | 193 ++++ nuon/api/actions/create_app_action.py | 193 ++++ .../api/actions/create_app_action_workflow.py | 193 ++++ nuon/api/actions/create_install_action_run.py | 203 +++++ .../create_install_action_workflow_run.py | 203 +++++ nuon/api/actions/delete_action.py | 169 ++++ nuon/api/actions/delete_action_workflow.py | 169 ++++ nuon/api/actions/get_action_latest_config.py | 192 ++++ nuon/api/actions/get_action_workflow.py | 171 ++++ .../api/actions/get_action_workflow_config.py | 171 ++++ .../actions/get_action_workflow_configs.py | 227 +++++ .../get_action_workflow_latest_config.py | 179 ++++ nuon/api/actions/get_action_workflows.py | 242 +++++ nuon/api/actions/get_app_action.py | 184 ++++ nuon/api/actions/get_app_action_config.py | 197 ++++ nuon/api/actions/get_app_action_configs.py | 240 +++++ nuon/api/actions/get_app_action_workflow.py | 184 ++++ .../actions/get_install_action_recent_runs.py | 235 +++++ nuon/api/actions/get_install_action_run.py | 184 ++++ .../actions/get_install_action_run_step.py | 205 +++++ nuon/api/actions/get_install_action_runs.py | 227 +++++ ...get_install_action_workflow_recent_runs.py | 235 +++++ .../get_install_action_workflow_run.py | 184 ++++ .../get_install_action_workflow_run_step.py | 205 +++++ .../get_install_action_workflow_runs.py | 227 +++++ ...et_install_action_workflows_latest_runs.py | 257 ++++++ .../get_install_actions_latest_runs.py | 257 ++++++ nuon/api/actions/update_app_action.py | 206 +++++ .../api/actions/update_app_action_workflow.py | 193 ++++ nuon/api/apps/__init__.py | 1 + nuon/api/apps/create_app.py | 180 ++++ nuon/api/apps/create_app_branch.py | 193 ++++ .../api/apps/create_app_break_glass_config.py | 193 ++++ nuon/api/apps/create_app_config.py | 201 +++++ nuon/api/apps/create_app_input_config.py | 201 +++++ .../api/apps/create_app_permissions_config.py | 193 ++++ nuon/api/apps/create_app_policies_config.py | 193 ++++ nuon/api/apps/create_app_runner_config.py | 193 ++++ nuon/api/apps/create_app_sandbox_config.py | 193 ++++ nuon/api/apps/create_app_secret.py | 213 +++++ nuon/api/apps/create_app_secrets_config.py | 193 ++++ nuon/api/apps/create_app_stack_config.py | 201 +++++ nuon/api/apps/delete_app.py | 169 ++++ nuon/api/apps/delete_app_secret.py | 190 ++++ nuon/api/apps/get_app.py | 179 ++++ nuon/api/apps/get_app_branch_app_configs.py | 240 +++++ nuon/api/apps/get_app_branches.py | 227 +++++ nuon/api/apps/get_app_break_glass_config.py | 192 ++++ nuon/api/apps/get_app_config.py | 213 +++++ nuon/api/apps/get_app_config_graph.py | 202 +++++ nuon/api/apps/get_app_config_template.py | 206 +++++ nuon/api/apps/get_app_configs.py | 235 +++++ nuon/api/apps/get_app_input_config.py | 192 ++++ nuon/api/apps/get_app_input_configs.py | 227 +++++ nuon/api/apps/get_app_input_latest_config.py | 171 ++++ nuon/api/apps/get_app_latest_config.py | 200 +++++ nuon/api/apps/get_app_permissions_config.py | 192 ++++ nuon/api/apps/get_app_policies_config.py | 192 ++++ nuon/api/apps/get_app_runner_configs.py | 227 +++++ nuon/api/apps/get_app_runner_latest_config.py | 171 ++++ nuon/api/apps/get_app_sandbox_configs.py | 227 +++++ .../api/apps/get_app_sandbox_latest_config.py | 171 ++++ nuon/api/apps/get_app_secrets.py | 243 +++++ nuon/api/apps/get_app_secrets_config.py | 192 ++++ nuon/api/apps/get_app_stack_config.py | 192 ++++ nuon/api/apps/get_apps.py | 229 +++++ .../apps/get_latest_app_break_glass_config.py | 179 ++++ .../apps/get_latest_app_permissions_config.py | 179 ++++ .../apps/get_latest_app_policies_config.py | 179 ++++ .../api/apps/get_latest_app_secrets_config.py | 179 ++++ nuon/api/apps/update_app.py | 193 ++++ nuon/api/apps/update_app_config.py | 206 +++++ nuon/api/apps/update_app_config_installs.py | 200 +++++ nuon/api/components/__init__.py | 1 + nuon/api/components/build_all_components.py | 198 ++++ .../components/create_app_component_build.py | 206 +++++ ...reate_app_docker_build_component_config.py | 208 +++++ .../create_app_helm_component_config.py | 214 +++++ ...pp_kubernetes_manifest_component_config.py | 208 +++++ ...e_app_terraform_module_component_config.py | 216 +++++ nuon/api/components/create_component.py | 193 ++++ nuon/api/components/create_component_build.py | 193 ++++ .../create_docker_build_component_config.py | 195 ++++ .../create_external_image_component_config.py | 195 ++++ .../create_helm_component_config.py | 201 +++++ .../components/create_job_component_config.py | 193 ++++ ...te_kubernetes_manifest_component_config.py | 195 ++++ ...reate_terraform_module_component_config.py | 203 +++++ nuon/api/components/delete_app_component.py | 182 ++++ nuon/api/components/delete_component.py | 169 ++++ nuon/api/components/get_app_component.py | 192 ++++ .../api/components/get_app_component_build.py | 205 +++++ .../components/get_app_component_builds.py | 240 +++++ .../components/get_app_component_config.py | 197 ++++ .../components/get_app_component_configs.py | 240 +++++ .../get_app_component_dependencies.py | 189 ++++ .../get_app_component_dependents.py | 184 ++++ .../get_app_component_latest_build.py | 184 ++++ .../get_app_component_latest_config.py | 184 ++++ nuon/api/components/get_app_components.py | 272 ++++++ nuon/api/components/get_build.py | 179 ++++ nuon/api/components/get_component.py | 171 ++++ nuon/api/components/get_component_build.py | 192 ++++ nuon/api/components/get_component_builds.py | 244 +++++ nuon/api/components/get_component_config.py | 184 ++++ nuon/api/components/get_component_configs.py | 227 +++++ .../components/get_component_dependencies.py | 176 ++++ .../components/get_component_dependents.py | 171 ++++ .../components/get_component_latest_build.py | 171 ++++ .../components/get_component_latest_config.py | 171 ++++ nuon/api/components/get_org_components.py | 229 +++++ nuon/api/components/update_app_component.py | 206 +++++ nuon/api/components/update_component.py | 193 ++++ nuon/api/general/__init__.py | 1 + nuon/api/general/create_waitlist.py | 155 ++++ nuon/api/general/get_cli_config.py | 147 +++ .../api/general/get_cloud_platform_regions.py | 184 ++++ nuon/api/general/get_config_schema.py | 271 ++++++ nuon/api/general/get_current_user.py | 147 +++ nuon/api/installers/__init__.py | 1 + nuon/api/installers/create_installer.py | 180 ++++ nuon/api/installers/delete_installer.py | 169 ++++ nuon/api/installers/get_installer.py | 171 ++++ nuon/api/installers/get_installers.py | 222 +++++ nuon/api/installers/render_installer.py | 171 ++++ nuon/api/installers/update_installer.py | 193 ++++ nuon/api/installs/__init__.py | 1 + nuon/api/installs/cancel_install_workflow.py | 169 ++++ nuon/api/installs/cancel_workflow.py | 169 ++++ nuon/api/installs/create_install.py | 193 ++++ .../create_install_component_deploy.py | 206 +++++ nuon/api/installs/create_install_config.py | 193 ++++ nuon/api/installs/create_install_deploy.py | 193 ++++ nuon/api/installs/create_install_inputs.py | 193 ++++ .../create_workflow_step_approval_response.py | 231 +++++ nuon/api/installs/delete_install.py | 169 ++++ .../api/installs/deploy_install_components.py | 211 +++++ nuon/api/installs/deprovision_install.py | 199 ++++ .../installs/deprovision_install_sandbox.py | 191 ++++ nuon/api/installs/forget_install.py | 203 +++++ .../installs/generate_cli_install_config.py | 171 ++++ nuon/api/installs/get_app_installs.py | 242 +++++ .../installs/get_current_install_inputs.py | 171 ++++ nuon/api/installs/get_drifted_objects.py | 176 ++++ nuon/api/installs/get_install.py | 212 +++++ nuon/api/installs/get_install_action.py | 192 ++++ .../installs/get_install_action_workflow.py | 192 ++++ .../installs/get_install_action_workflows.py | 235 +++++ nuon/api/installs/get_install_actions.py | 235 +++++ nuon/api/installs/get_install_audit_logs.py | 212 +++++ nuon/api/installs/get_install_component.py | 184 ++++ .../installs/get_install_component_deploy.py | 197 ++++ .../installs/get_install_component_deploys.py | 240 +++++ .../get_install_component_latest_deploy.py | 184 ++++ .../installs/get_install_component_outputs.py | 200 +++++ nuon/api/installs/get_install_components.py | 242 +++++ .../get_install_components_deploys.py | 227 +++++ .../get_install_components_summary.py | 257 ++++++ nuon/api/installs/get_install_deploy.py | 184 ++++ nuon/api/installs/get_install_deploys.py | 227 +++++ nuon/api/installs/get_install_event.py | 192 ++++ nuon/api/installs/get_install_events.py | 243 +++++ nuon/api/installs/get_install_inputs.py | 227 +++++ .../api/installs/get_install_latest_deploy.py | 171 ++++ nuon/api/installs/get_install_readme.py | 187 ++++ nuon/api/installs/get_install_runner_group.py | 179 ++++ nuon/api/installs/get_install_sandbox_run.py | 171 ++++ .../installs/get_install_sandbox_run_v2.py | 184 ++++ nuon/api/installs/get_install_sandbox_runs.py | 227 +++++ nuon/api/installs/get_install_stack.py | 171 ++++ .../get_install_stack_by_install_id.py | 171 ++++ nuon/api/installs/get_install_stack_runs.py | 179 ++++ nuon/api/installs/get_install_state.py | 171 ++++ .../api/installs/get_install_state_history.py | 227 +++++ nuon/api/installs/get_install_workflow.py | 179 ++++ .../api/installs/get_install_workflow_step.py | 192 ++++ .../get_install_workflow_step_approval.py | 197 ++++ .../installs/get_install_workflow_steps.py | 184 ++++ nuon/api/installs/get_org_installs.py | 229 +++++ nuon/api/installs/get_workflow.py | 179 ++++ nuon/api/installs/get_workflow_step.py | 192 ++++ .../installs/get_workflow_step_approval.py | 197 ++++ .../get_workflow_step_approval_contents.py | 205 +++++ nuon/api/installs/get_workflow_steps.py | 184 ++++ nuon/api/installs/get_workflows.py | 295 ++++++ nuon/api/installs/phone_home.py | 216 +++++ nuon/api/installs/reprovision_install.py | 203 +++++ .../installs/reprovision_install_sandbox.py | 199 ++++ .../installs/retry_owner_workflow_by_id.py | 193 ++++ nuon/api/installs/retry_workflow.py | 193 ++++ nuon/api/installs/retry_workflow_step.py | 206 +++++ nuon/api/installs/sync_secrets.py | 199 ++++ .../installs/teardown_install_component.py | 204 +++++ .../installs/teardown_install_components.py | 199 ++++ nuon/api/installs/update_install.py | 193 ++++ nuon/api/installs/update_install_config.py | 206 +++++ nuon/api/installs/update_install_inputs.py | 193 ++++ nuon/api/installs/update_install_workflow.py | 193 ++++ nuon/api/installs/update_workflow.py | 193 ++++ nuon/api/orgs/__init__.py | 1 + nuon/api/orgs/add_user.py | 180 ++++ nuon/api/orgs/create_org.py | 180 ++++ nuon/api/orgs/create_org_invite.py | 200 +++++ nuon/api/orgs/delete_org.py | 145 +++ nuon/api/orgs/get_org.py | 147 +++ nuon/api/orgs/get_org_acounts.py | 209 +++++ nuon/api/orgs/get_org_invites.py | 222 +++++ nuon/api/orgs/get_org_runner_group.py | 155 ++++ nuon/api/orgs/get_orgs.py | 229 +++++ nuon/api/orgs/remove_user.py | 188 ++++ nuon/api/orgs/update_org.py | 180 ++++ nuon/api/releases/__init__.py | 1 + nuon/api/releases/create_component_release.py | 193 ++++ nuon/api/releases/get_app_releases.py | 227 +++++ nuon/api/releases/get_component_releases.py | 227 +++++ nuon/api/releases/get_release.py | 171 ++++ nuon/api/releases/get_release_steps.py | 227 +++++ nuon/api/runners/__init__.py | 1 + nuon/api/runners/cancel_runner_job.py | 201 +++++ .../api/runners/create_terraform_workspace.py | 180 ++++ .../runners/create_terraform_workspace_v2.py | 180 ++++ .../api/runners/delete_terraform_workspace.py | 176 ++++ nuon/api/runners/force_shut_down_runner.py | 207 +++++ .../runners/get_latest_runner_heart_beat.py | 179 ++++ nuon/api/runners/get_log_stream.py | 179 ++++ nuon/api/runners/get_runner_connect_status.py | 203 +++++ nuon/api/runners/get_runner_job.py | 179 ++++ .../runners/get_runner_job_composite_plan.py | 179 ++++ nuon/api/runners/get_runner_job_plan.py | 177 ++++ nuon/api/runners/get_runner_job_plan_v2.py | 190 ++++ nuon/api/runners/get_runner_job_v2.py | 192 ++++ nuon/api/runners/get_runner_jobs.py | 295 ++++++ .../runners/get_runner_latest_heart_beat.py | 179 ++++ .../get_runner_recent_health_checks.py | 253 ++++++ nuon/api/runners/get_runner_settings.py | 179 ++++ .../get_terraform_current_state_data.py | 147 +++ nuon/api/runners/get_terraform_states.py | 227 +++++ nuon/api/runners/get_terraform_states_v2.py | 227 +++++ nuon/api/runners/get_terraform_workspace.py | 176 ++++ .../runners/get_terraform_workspace_lock.py | 171 ++++ .../get_terraform_workspace_state_by_id.py | 184 ++++ .../get_terraform_workspace_state_by_idv2.py | 184 ++++ ...erraform_workspace_state_json_resources.py | 186 ++++ ...aform_workspace_state_json_resources_v2.py | 186 ++++ ...get_terraform_workspace_state_resources.py | 189 ++++ .../get_terraform_workspace_states_json.py | 227 +++++ ...t_terraform_workspace_states_json_by_id.py | 186 ++++ ...terraform_workspace_states_json_by_idv2.py | 186 ++++ .../get_terraform_workspace_states_jsonv2.py | 227 +++++ nuon/api/runners/get_terraform_workspaces.py | 152 ++++ nuon/api/runners/graceful_shut_down_runner.py | 211 +++++ nuon/api/runners/lock_terraform_workspace.py | 213 +++++ nuon/api/runners/log_stream_read_logs.py | 202 +++++ nuon/api/runners/mng_vm_shut_down.py | 191 ++++ nuon/api/runners/shut_down_runner_mng.py | 191 ++++ .../api/runners/unlock_terraform_workspace.py | 193 ++++ nuon/api/runners/update_runner_mng.py | 191 ++++ nuon/api/runners/update_runner_settings.py | 193 ++++ nuon/api/runners/update_terraform_state.py | 180 ++++ nuon/api/runnersrunner/__init__.py | 1 + nuon/api/runnersrunner/get_runner.py | 179 ++++ .../get_runner_job_executions.py | 235 +++++ nuon/api/vcs/__init__.py | 1 + nuon/api/vcs/create_vcs_connection.py | 180 ++++ .../api/vcs/create_vcs_connection_callback.py | 180 ++++ nuon/api/vcs/delete_vcs_connection.py | 169 ++++ nuon/api/vcs/get_org_vcs_connections.py | 214 +++++ nuon/api/vcs/get_vcs_connection.py | 171 ++++ nuon/client.py | 268 ++++++ nuon/errors.py | 16 + nuon/models/__init__.py | 847 ++++++++++++++++++ nuon/models/app_account.py | 187 ++++ nuon/models/app_account_type.py | 11 + nuon/models/app_action_workflow.py | 156 ++++ nuon/models/app_action_workflow_config.py | 221 +++++ .../models/app_action_workflow_step_config.py | 227 +++++ ...pp_action_workflow_step_config_env_vars.py | 44 + .../app_action_workflow_trigger_config.py | 171 ++++ .../app_action_workflow_trigger_type.py | 31 + nuon/models/app_app.py | 291 ++++++ nuon/models/app_app_awsiam_policy_config.py | 149 +++ nuon/models/app_app_awsiam_role_config.py | 218 +++++ nuon/models/app_app_branch.py | 147 +++ nuon/models/app_app_break_glass_config.py | 138 +++ nuon/models/app_app_config.py | 423 +++++++++ nuon/models/app_app_config_status.py | 12 + nuon/models/app_app_config_version.py | 9 + nuon/models/app_app_input.py | 216 +++++ nuon/models/app_app_input_config.py | 180 ++++ nuon/models/app_app_input_group.py | 165 ++++ nuon/models/app_app_links.py | 44 + nuon/models/app_app_permissions_config.py | 202 +++++ nuon/models/app_app_policies_config.py | 113 +++ nuon/models/app_app_runner_config.py | 188 ++++ nuon/models/app_app_runner_config_env_vars.py | 44 + .../app_app_runner_config_helm_driver_type.py | 10 + nuon/models/app_app_runner_type.py | 15 + nuon/models/app_app_sandbox_config.py | 268 ++++++ .../models/app_app_sandbox_config_env_vars.py | 44 + .../app_app_sandbox_config_variables.py | 44 + nuon/models/app_app_secret.py | 122 +++ nuon/models/app_app_secret_config.py | 230 +++++ nuon/models/app_app_secrets_config.py | 138 +++ nuon/models/app_app_stack_config.py | 166 ++++ nuon/models/app_aws_account.py | 104 +++ nuon/models/app_aws_stack_outputs.py | 166 ++++ ...aws_stack_outputs_break_glass_role_arns.py | 44 + nuon/models/app_awsecr_image_config.py | 122 +++ nuon/models/app_awsiam_role_type.py | 12 + nuon/models/app_azure_account.py | 131 +++ nuon/models/app_azure_stack_outputs.py | 175 ++++ nuon/models/app_cloud_platform.py | 10 + nuon/models/app_cloud_platform_region.py | 86 ++ nuon/models/app_component.py | 199 ++++ nuon/models/app_component_build.py | 313 +++++++ nuon/models/app_component_build_status.py | 12 + .../models/app_component_config_connection.py | 321 +++++++ nuon/models/app_component_links.py | 44 + nuon/models/app_component_release.py | 147 +++ nuon/models/app_component_release_step.py | 161 ++++ nuon/models/app_component_type.py | 14 + nuon/models/app_composite_status.py | 135 +++ nuon/models/app_composite_status_metadata.py | 44 + .../models/app_connected_github_vcs_config.py | 180 ++++ .../app_docker_build_component_config.py | 182 ++++ ..._docker_build_component_config_env_vars.py | 44 + nuon/models/app_drifted_object.py | 140 +++ .../app_external_image_component_config.py | 135 +++ nuon/models/app_helm_chart.py | 138 +++ nuon/models/app_helm_component_config.py | 218 +++++ .../app_helm_component_config_values.py | 44 + nuon/models/app_helm_config.py | 119 +++ nuon/models/app_helm_config_values.py | 44 + nuon/models/app_helm_release.py | 211 +++++ nuon/models/app_install.py | 573 ++++++++++++ nuon/models/app_install_action_workflow.py | 156 ++++ .../models/app_install_action_workflow_run.py | 380 ++++++++ ...app_install_action_workflow_run_outputs.py | 44 + ...nstall_action_workflow_run_run_env_vars.py | 44 + .../app_install_action_workflow_run_step.py | 130 +++ ...install_action_workflow_run_step_status.py | 12 + nuon/models/app_install_approval_option.py | 9 + nuon/models/app_install_audit_log.py | 86 ++ nuon/models/app_install_component.py | 255 ++++++ nuon/models/app_install_component_links.py | 44 + nuon/models/app_install_component_statuses.py | 44 + nuon/models/app_install_component_summary.py | 181 ++++ nuon/models/app_install_config.py | 121 +++ nuon/models/app_install_deploy.py | 383 ++++++++ nuon/models/app_install_deploy_outputs.py | 44 + nuon/models/app_install_deploy_status.py | 23 + nuon/models/app_install_deploy_type.py | 10 + nuon/models/app_install_event.py | 161 ++++ nuon/models/app_install_event_payload.py | 44 + nuon/models/app_install_inputs.py | 153 ++++ .../app_install_inputs_redacted_values.py | 44 + nuon/models/app_install_inputs_values.py | 44 + nuon/models/app_install_links.py | 44 + nuon/models/app_install_metadata.py | 44 + nuon/models/app_install_sandbox.py | 174 ++++ nuon/models/app_install_sandbox_run.py | 311 +++++++ .../models/app_install_sandbox_run_outputs.py | 44 + nuon/models/app_install_stack.py | 147 +++ nuon/models/app_install_stack_outputs.py | 189 ++++ nuon/models/app_install_stack_outputs_data.py | 44 + ...app_install_stack_outputs_data_contents.py | 44 + nuon/models/app_install_stack_version.py | 237 +++++ nuon/models/app_install_stack_version_run.py | 126 +++ .../app_install_stack_version_run_data.py | 44 + ...install_stack_version_run_data_contents.py | 44 + nuon/models/app_install_state.py | 162 ++++ nuon/models/app_installer.py | 155 ++++ nuon/models/app_installer_metadata.py | 221 +++++ nuon/models/app_installer_type.py | 8 + nuon/models/app_job_component_config.py | 157 ++++ .../app_job_component_config_env_vars.py | 44 + nuon/models/app_json_map.py | 44 + ...pp_kubernetes_manifest_component_config.py | 113 +++ nuon/models/app_latest_runner_heart_beat.py | 104 +++ nuon/models/app_log_stream.py | 162 ++++ nuon/models/app_log_stream_attrs.py | 44 + nuon/models/app_notifications_config.py | 122 +++ nuon/models/app_oci_artifact.py | 247 +++++ nuon/models/app_oci_artifact_annotations.py | 44 + nuon/models/app_operation_status.py | 11 + nuon/models/app_org.py | 228 +++++ nuon/models/app_org_invite.py | 138 +++ nuon/models/app_org_invite_status.py | 9 + nuon/models/app_org_links.py | 44 + nuon/models/app_otel_log_record.py | 333 +++++++ .../app_otel_log_record_log_attributes.py | 44 + ...app_otel_log_record_resource_attributes.py | 44 + .../app_otel_log_record_scope_attributes.py | 44 + nuon/models/app_policy.py | 135 +++ nuon/models/app_policy_name.py | 11 + nuon/models/app_policy_permissions.py | 44 + nuon/models/app_public_git_vcs_config.py | 131 +++ nuon/models/app_role.py | 146 +++ nuon/models/app_role_type.py | 11 + nuon/models/app_runner.py | 220 +++++ nuon/models/app_runner_group.py | 190 ++++ nuon/models/app_runner_group_settings.py | 309 +++++++ .../app_runner_group_settings_aws_tags.py | 44 + .../app_runner_group_settings_metadata.py | 44 + nuon/models/app_runner_group_type.py | 9 + nuon/models/app_runner_health_check.py | 161 ++++ nuon/models/app_runner_heart_beat.py | 131 +++ nuon/models/app_runner_job.py | 370 ++++++++ nuon/models/app_runner_job_execution.py | 161 ++++ .../app_runner_job_execution_outputs.py | 135 +++ ...pp_runner_job_execution_outputs_outputs.py | 63 ++ ...ion_outputs_outputs_additional_property.py | 44 + .../models/app_runner_job_execution_result.py | 180 ++++ ...ner_job_execution_result_error_metadata.py | 44 + .../models/app_runner_job_execution_status.py | 17 + nuon/models/app_runner_job_group.py | 18 + nuon/models/app_runner_job_metadata.py | 44 + nuon/models/app_runner_job_operation_type.py | 13 + nuon/models/app_runner_job_outputs.py | 44 + nuon/models/app_runner_job_status.py | 16 + nuon/models/app_runner_job_type.py | 34 + nuon/models/app_runner_operation.py | 152 ++++ nuon/models/app_runner_operation_type.py | 11 + nuon/models/app_runner_status.py | 17 + nuon/models/app_sandbox_run_type.py | 10 + nuon/models/app_stack_type.py | 8 + nuon/models/app_status.py | 37 + nuon/models/app_step_error_behavior.py | 9 + nuon/models/app_terraform_lock.py | 113 +++ .../app_terraform_module_component_config.py | 191 ++++ ...raform_module_component_config_env_vars.py | 44 + ...aform_module_component_config_variables.py | 44 + nuon/models/app_terraform_state_instance.py | 92 ++ ...app_terraform_state_instance_attributes.py | 44 + nuon/models/app_terraform_state_resource.py | 111 +++ nuon/models/app_terraform_workspace.py | 113 +++ nuon/models/app_terraform_workspace_lock.py | 145 +++ nuon/models/app_terraform_workspace_state.py | 173 ++++ .../app_terraform_workspace_state_json.py | 138 +++ nuon/models/app_user_journey.py | 93 ++ nuon/models/app_user_journey_step.py | 126 +++ nuon/models/app_user_journey_step_metadata.py | 44 + nuon/models/app_vcs_connection.py | 138 +++ nuon/models/app_vcs_connection_commit.py | 131 +++ nuon/models/app_waitlist.py | 95 ++ nuon/models/app_workflow.py | 371 ++++++++ nuon/models/app_workflow_links.py | 44 + nuon/models/app_workflow_metadata.py | 44 + nuon/models/app_workflow_step.py | 378 ++++++++ nuon/models/app_workflow_step_approval.py | 222 +++++ .../app_workflow_step_approval_response.py | 44 + .../models/app_workflow_step_approval_type.py | 12 + .../app_workflow_step_execution_type.py | 12 + nuon/models/app_workflow_step_links.py | 44 + nuon/models/app_workflow_step_metadata.py | 44 + .../app_workflow_step_policy_validation.py | 136 +++ .../models/app_workflow_step_response_type.py | 13 + nuon/models/app_workflow_type.py | 24 + nuon/models/config_app_policy_type.py | 11 + nuon/models/configs_oci_registry_auth.py | 68 ++ .../models/configs_oci_registry_repository.py | 170 ++++ nuon/models/configs_oci_registry_type.py | 11 + nuon/models/credentials_assume_role_config.py | 109 +++ ...edentials_service_principal_credentials.py | 68 ++ nuon/models/credentials_static_credentials.py | 75 ++ nuon/models/generics_null_time.py | 68 ++ nuon/models/get_app_config_template_type.py | 25 + nuon/models/get_config_schema_response_200.py | 44 + ..._install_component_outputs_response_200.py | 44 + ...space_state_json_resources_response_200.py | 44 + ...ce_state_json_resources_v2_response_200.py | 44 + ...orkspace_states_json_by_id_response_200.py | 44 + ...kspace_states_json_by_idv2_response_200.py | 44 + ...low_step_approval_contents_response_200.py | 44 + ...oolsdev_mono_pkg_aws_credentials_config.py | 127 +++ ...lsdev_mono_pkg_azure_credentials_config.py | 81 ++ ...owertoolsdev_mono_pkg_types_state_state.py | 301 +++++++ ...v_mono_pkg_types_state_state_components.py | 44 + .../helpers_create_install_config_params.py | 67 ++ nuon/models/helpers_install_metadata.py | 59 ++ nuon/models/iam_static_credentials.py | 77 ++ nuon/models/iam_two_step_config.py | 90 ++ nuon/models/kube_cluster_info.py | 174 ++++ nuon/models/kube_cluster_info_env_vars.py | 44 + nuon/models/lock_terraform_workspace_body.py | 44 + nuon/models/outputs_secret_sync_output.py | 122 +++ nuon/models/permissions_permission.py | 13 + nuon/models/permissions_set.py | 53 ++ .../plantypes_action_workflow_run_plan.py | 213 +++++ ...lantypes_action_workflow_run_plan_attrs.py | 44 + ...tion_workflow_run_plan_builtin_env_vars.py | 44 + ...ion_workflow_run_plan_override_env_vars.py | 44 + ...plantypes_action_workflow_run_step_plan.py | 141 +++ ...pes_action_workflow_run_step_plan_attrs.py | 44 + ...low_run_step_plan_interpolated_env_vars.py | 44 + nuon/models/plantypes_build_plan.py | 201 +++++ nuon/models/plantypes_composite_plan.py | 162 ++++ .../plantypes_container_image_pull_plan.py | 90 ++ nuon/models/plantypes_deploy_plan.py | 229 +++++ nuon/models/plantypes_docker_build_plan.py | 99 ++ .../plantypes_docker_build_plan_build_args.py | 44 + nuon/models/plantypes_git_source.py | 86 ++ nuon/models/plantypes_helm_build_plan.py | 72 ++ .../plantypes_helm_build_plan_labels.py | 44 + nuon/models/plantypes_helm_deploy_plan.py | 160 ++++ nuon/models/plantypes_helm_sandbox_mode.py | 68 ++ nuon/models/plantypes_helm_value.py | 77 ++ ...antypes_kubernetes_manifest_deploy_plan.py | 90 ++ .../plantypes_kubernetes_sandbox_mode.py | 68 ++ .../plantypes_kubernetes_secret_sync.py | 106 +++ nuon/models/plantypes_noop_deploy_plan.py | 44 + nuon/models/plantypes_sandbox_mode.py | 135 +++ nuon/models/plantypes_sandbox_mode_outputs.py | 44 + nuon/models/plantypes_sandbox_run_plan.py | 323 +++++++ .../plantypes_sandbox_run_plan_env_vars.py | 44 + .../plantypes_sandbox_run_plan_policies.py | 44 + .../models/plantypes_sandbox_run_plan_vars.py | 44 + nuon/models/plantypes_sync_oci_plan.py | 109 +++ nuon/models/plantypes_sync_secrets_plan.py | 155 ++++ nuon/models/plantypes_terraform_backend.py | 59 ++ nuon/models/plantypes_terraform_build_plan.py | 72 ++ .../plantypes_terraform_build_plan_labels.py | 44 + .../plantypes_terraform_deploy_hooks.py | 103 +++ ...antypes_terraform_deploy_hooks_env_vars.py | 44 + .../models/plantypes_terraform_deploy_plan.py | 250 ++++++ ...lantypes_terraform_deploy_plan_env_vars.py | 44 + ...lantypes_terraform_deploy_plan_policies.py | 44 + .../plantypes_terraform_deploy_plan_vars.py | 44 + .../plantypes_terraform_local_archive.py | 59 ++ .../plantypes_terraform_sandbox_mode.py | 88 ++ nuon/models/refs_ref.py | 94 ++ nuon/models/refs_ref_type.py | 14 + .../service_app_awsiam_policy_config.py | 77 ++ nuon/models/service_app_awsiam_role_config.py | 111 +++ nuon/models/service_app_config_template.py | 102 +++ .../service_app_config_template_type.py | 25 + nuon/models/service_app_group_request.py | 75 ++ nuon/models/service_app_input_request.py | 130 +++ nuon/models/service_app_policy_config.py | 69 ++ nuon/models/service_app_secret_config.py | 140 +++ .../service_aws_ecr_image_config_request.py | 68 ++ .../service_build_all_components_request.py | 44 + .../service_cancel_runner_job_request.py | 44 + nuon/models/service_cli_config.py | 86 ++ nuon/models/service_component_children.py | 75 ++ ...thub_vcs_action_workflow_config_request.py | 87 ++ ...ice_connected_github_vcs_config_request.py | 87 ++ ...ected_github_vcs_sandbox_config_request.py | 87 ++ ...e_create_action_workflow_config_request.py | 147 +++ ...ate_action_workflow_config_step_request.py | 162 ++++ ...n_workflow_config_step_request_env_vars.py | 44 + ..._action_workflow_config_trigger_request.py | 89 ++ .../service_create_app_action_request.py | 59 ++ ...vice_create_app_action_workflow_request.py | 59 ++ .../service_create_app_branch_request.py | 67 ++ ...e_create_app_break_glass_config_request.py | 81 ++ .../service_create_app_config_request.py | 68 ++ ...service_create_app_input_config_request.py | 86 ++ ..._create_app_input_config_request_groups.py | 57 ++ ..._create_app_input_config_request_inputs.py | 57 ++ ...e_create_app_permissions_config_request.py | 110 +++ ...vice_create_app_policies_config_request.py | 86 ++ nuon/models/service_create_app_request.py | 88 ++ ...ervice_create_app_runner_config_request.py | 121 +++ ...eate_app_runner_config_request_env_vars.py | 44 + ...rvice_create_app_sandbox_config_request.py | 173 ++++ ...ate_app_sandbox_config_request_env_vars.py | 44 + ...te_app_sandbox_config_request_variables.py | 44 + .../service_create_app_secret_request.py | 67 ++ ...rvice_create_app_secrets_config_request.py | 86 ++ ...service_create_app_stack_config_request.py | 104 +++ .../service_create_component_build_request.py | 68 ++ ...ervice_create_component_release_request.py | 103 +++ ...eate_component_release_request_strategy.py | 68 ++ .../service_create_component_request.py | 81 ++ ...vice_create_connection_callback_request.py | 67 ++ .../service_create_connection_request.py | 59 ++ ...e_docker_build_component_config_request.py | 183 ++++ ...build_component_config_request_env_vars.py | 44 + ...external_image_component_config_request.py | 131 +++ ...ce_create_helm_component_config_request.py | 202 +++++ ...te_helm_component_config_request_values.py | 44 + ...ate_install_action_workflow_run_request.py | 85 ++ ...ction_workflow_run_request_run_env_vars.py | 44 + ...create_install_component_deploy_request.py | 77 ++ .../service_create_install_config_request.py | 67 ++ .../service_create_install_deploy_request.py | 77 ++ .../service_create_install_inputs_request.py | 65 ++ ...ce_create_install_inputs_request_inputs.py | 44 + nuon/models/service_create_install_request.py | 155 ++++ ...vice_create_install_request_aws_account.py | 59 ++ ...ce_create_install_request_azure_account.py | 59 ++ .../service_create_install_request_inputs.py | 44 + .../service_create_installer_request.py | 91 ++ ...rvice_create_installer_request_metadata.py | 154 ++++ ...ice_create_job_component_config_request.py | 146 +++ ...e_job_component_config_request_env_vars.py | 44 + ...netes_manifest_component_config_request.py | 117 +++ .../service_create_org_invite_request.py | 59 ++ nuon/models/service_create_org_request.py | 70 ++ .../models/service_create_org_user_request.py | 59 ++ ...rraform_module_component_config_request.py | 190 ++++ ...odule_component_config_request_env_vars.py | 44 + ...dule_component_config_request_variables.py | 44 + ...vice_create_terraform_workspace_request.py | 67 ++ .../service_create_user_journey_request.py | 89 ++ .../service_create_user_journey_step_req.py | 67 ++ ...workflow_step_approval_response_request.py | 76 ++ ...orkflow_step_approval_response_response.py | 77 ++ ...rvice_deploy_install_components_request.py | 59 ++ .../service_deprovision_install_request.py | 68 ++ ...ice_deprovision_install_sandbox_request.py | 68 ++ nuon/models/service_force_shutdown_request.py | 44 + nuon/models/service_forget_install_request.py | 44 + .../service_graceful_shutdown_request.py | 44 + .../service_install_phone_home_request.py | 44 + .../service_latest_runner_heart_beats.py | 57 ++ nuon/models/service_mng_shut_down_request.py | 44 + nuon/models/service_mng_update_request.py | 44 + .../service_mng_vm_shut_down_request.py | 44 + .../service_patch_install_config_params.py | 67 ++ ..._git_vcs_action_workflow_config_request.py | 75 ++ .../service_public_git_vcs_config_request.py | 75 ++ ...e_public_git_vcs_sandbox_config_request.py | 75 ++ nuon/models/service_readme.py | 79 ++ .../models/service_remove_org_user_request.py | 59 ++ nuon/models/service_rendered_installer.py | 102 +++ .../service_reprovision_install_request.py | 59 ++ ...ice_reprovision_install_sandbox_request.py | 59 ++ .../service_retry_workflow_by_id_request.py | 68 ++ .../service_retry_workflow_by_id_response.py | 59 ++ nuon/models/service_retry_workflow_request.py | 77 ++ .../models/service_retry_workflow_response.py | 59 ++ .../service_retry_workflow_step_response.py | 59 ++ .../service_runner_connection_status.py | 68 ++ nuon/models/service_sync_secrets_request.py | 59 ++ ...vice_teardown_install_component_request.py | 68 ++ ...ice_teardown_install_components_request.py | 68 ++ .../service_update_action_workflow_request.py | 59 ++ ...vice_update_app_config_installs_request.py | 70 ++ .../service_update_app_config_request.py | 96 ++ nuon/models/service_update_app_request.py | 104 +++ .../service_update_component_request.py | 81 ++ .../service_update_install_config_request.py | 67 ++ .../service_update_install_inputs_request.py | 65 ++ ...ce_update_install_inputs_request_inputs.py | 44 + nuon/models/service_update_install_request.py | 99 ++ .../service_update_installer_request.py | 91 ++ ...rvice_update_installer_request_metadata.py | 154 ++++ nuon/models/service_update_org_request.py | 59 ++ .../service_update_runner_settings_request.py | 104 +++ ...ervice_update_user_journey_step_request.py | 59 ++ .../models/service_update_workflow_request.py | 61 ++ nuon/models/service_waitlist_request.py | 59 ++ nuon/models/state_action_workflow_state.py | 99 ++ .../state_action_workflow_state_outputs.py | 44 + nuon/models/state_actions_state.py | 81 ++ nuon/models/state_actions_state_workflows.py | 57 ++ nuon/models/state_app_state.py | 108 +++ nuon/models/state_app_state_variables.py | 44 + nuon/models/state_aws_cloud_account.py | 59 ++ nuon/models/state_azure_cloud_account.py | 59 ++ nuon/models/state_cloud_account.py | 90 ++ nuon/models/state_domain_state.py | 77 ++ nuon/models/state_inputs_state.py | 81 ++ nuon/models/state_inputs_state_inputs.py | 44 + nuon/models/state_install_stack_state.py | 126 +++ .../state_install_stack_state_outputs.py | 44 + nuon/models/state_install_state.py | 135 +++ nuon/models/state_install_state_inputs.py | 44 + nuon/models/state_org_state.py | 86 ++ nuon/models/state_runner_state.py | 86 ++ nuon/models/state_sandbox_state.py | 127 +++ nuon/models/state_sandbox_state_outputs.py | 44 + nuon/models/state_secrets_state.py | 57 ++ nuon/models/stderr_err_response.py | 77 ++ nuon/models/types_string_bool_map.py | 44 + .../models/unlock_terraform_workspace_body.py | 44 + nuon/models/update_terraform_state_body.py | 44 + nuon/py.typed | 1 + nuon/types.py | 54 ++ pyproject.toml | 2 +- uv.lock | 199 +++- version.txt | 1 + 695 files changed, 92877 insertions(+), 2 deletions(-) create mode 100644 nuon/__init__.py create mode 100644 nuon/api/__init__.py create mode 100644 nuon/api/accounts/__init__.py create mode 100644 nuon/api/accounts/complete_user_journey.py create mode 100644 nuon/api/accounts/create_user_journey.py create mode 100644 nuon/api/accounts/get_current_account.py create mode 100644 nuon/api/accounts/get_user_journeys.py create mode 100644 nuon/api/accounts/reset_user_journey.py create mode 100644 nuon/api/accounts/update_user_journey_step.py create mode 100644 nuon/api/actions/__init__.py create mode 100644 nuon/api/actions/create_action_config.py create mode 100644 nuon/api/actions/create_action_workflow_config.py create mode 100644 nuon/api/actions/create_app_action.py create mode 100644 nuon/api/actions/create_app_action_workflow.py create mode 100644 nuon/api/actions/create_install_action_run.py create mode 100644 nuon/api/actions/create_install_action_workflow_run.py create mode 100644 nuon/api/actions/delete_action.py create mode 100644 nuon/api/actions/delete_action_workflow.py create mode 100644 nuon/api/actions/get_action_latest_config.py create mode 100644 nuon/api/actions/get_action_workflow.py create mode 100644 nuon/api/actions/get_action_workflow_config.py create mode 100644 nuon/api/actions/get_action_workflow_configs.py create mode 100644 nuon/api/actions/get_action_workflow_latest_config.py create mode 100644 nuon/api/actions/get_action_workflows.py create mode 100644 nuon/api/actions/get_app_action.py create mode 100644 nuon/api/actions/get_app_action_config.py create mode 100644 nuon/api/actions/get_app_action_configs.py create mode 100644 nuon/api/actions/get_app_action_workflow.py create mode 100644 nuon/api/actions/get_install_action_recent_runs.py create mode 100644 nuon/api/actions/get_install_action_run.py create mode 100644 nuon/api/actions/get_install_action_run_step.py create mode 100644 nuon/api/actions/get_install_action_runs.py create mode 100644 nuon/api/actions/get_install_action_workflow_recent_runs.py create mode 100644 nuon/api/actions/get_install_action_workflow_run.py create mode 100644 nuon/api/actions/get_install_action_workflow_run_step.py create mode 100644 nuon/api/actions/get_install_action_workflow_runs.py create mode 100644 nuon/api/actions/get_install_action_workflows_latest_runs.py create mode 100644 nuon/api/actions/get_install_actions_latest_runs.py create mode 100644 nuon/api/actions/update_app_action.py create mode 100644 nuon/api/actions/update_app_action_workflow.py create mode 100644 nuon/api/apps/__init__.py create mode 100644 nuon/api/apps/create_app.py create mode 100644 nuon/api/apps/create_app_branch.py create mode 100644 nuon/api/apps/create_app_break_glass_config.py create mode 100644 nuon/api/apps/create_app_config.py create mode 100644 nuon/api/apps/create_app_input_config.py create mode 100644 nuon/api/apps/create_app_permissions_config.py create mode 100644 nuon/api/apps/create_app_policies_config.py create mode 100644 nuon/api/apps/create_app_runner_config.py create mode 100644 nuon/api/apps/create_app_sandbox_config.py create mode 100644 nuon/api/apps/create_app_secret.py create mode 100644 nuon/api/apps/create_app_secrets_config.py create mode 100644 nuon/api/apps/create_app_stack_config.py create mode 100644 nuon/api/apps/delete_app.py create mode 100644 nuon/api/apps/delete_app_secret.py create mode 100644 nuon/api/apps/get_app.py create mode 100644 nuon/api/apps/get_app_branch_app_configs.py create mode 100644 nuon/api/apps/get_app_branches.py create mode 100644 nuon/api/apps/get_app_break_glass_config.py create mode 100644 nuon/api/apps/get_app_config.py create mode 100644 nuon/api/apps/get_app_config_graph.py create mode 100644 nuon/api/apps/get_app_config_template.py create mode 100644 nuon/api/apps/get_app_configs.py create mode 100644 nuon/api/apps/get_app_input_config.py create mode 100644 nuon/api/apps/get_app_input_configs.py create mode 100644 nuon/api/apps/get_app_input_latest_config.py create mode 100644 nuon/api/apps/get_app_latest_config.py create mode 100644 nuon/api/apps/get_app_permissions_config.py create mode 100644 nuon/api/apps/get_app_policies_config.py create mode 100644 nuon/api/apps/get_app_runner_configs.py create mode 100644 nuon/api/apps/get_app_runner_latest_config.py create mode 100644 nuon/api/apps/get_app_sandbox_configs.py create mode 100644 nuon/api/apps/get_app_sandbox_latest_config.py create mode 100644 nuon/api/apps/get_app_secrets.py create mode 100644 nuon/api/apps/get_app_secrets_config.py create mode 100644 nuon/api/apps/get_app_stack_config.py create mode 100644 nuon/api/apps/get_apps.py create mode 100644 nuon/api/apps/get_latest_app_break_glass_config.py create mode 100644 nuon/api/apps/get_latest_app_permissions_config.py create mode 100644 nuon/api/apps/get_latest_app_policies_config.py create mode 100644 nuon/api/apps/get_latest_app_secrets_config.py create mode 100644 nuon/api/apps/update_app.py create mode 100644 nuon/api/apps/update_app_config.py create mode 100644 nuon/api/apps/update_app_config_installs.py create mode 100644 nuon/api/components/__init__.py create mode 100644 nuon/api/components/build_all_components.py create mode 100644 nuon/api/components/create_app_component_build.py create mode 100644 nuon/api/components/create_app_docker_build_component_config.py create mode 100644 nuon/api/components/create_app_helm_component_config.py create mode 100644 nuon/api/components/create_app_kubernetes_manifest_component_config.py create mode 100644 nuon/api/components/create_app_terraform_module_component_config.py create mode 100644 nuon/api/components/create_component.py create mode 100644 nuon/api/components/create_component_build.py create mode 100644 nuon/api/components/create_docker_build_component_config.py create mode 100644 nuon/api/components/create_external_image_component_config.py create mode 100644 nuon/api/components/create_helm_component_config.py create mode 100644 nuon/api/components/create_job_component_config.py create mode 100644 nuon/api/components/create_kubernetes_manifest_component_config.py create mode 100644 nuon/api/components/create_terraform_module_component_config.py create mode 100644 nuon/api/components/delete_app_component.py create mode 100644 nuon/api/components/delete_component.py create mode 100644 nuon/api/components/get_app_component.py create mode 100644 nuon/api/components/get_app_component_build.py create mode 100644 nuon/api/components/get_app_component_builds.py create mode 100644 nuon/api/components/get_app_component_config.py create mode 100644 nuon/api/components/get_app_component_configs.py create mode 100644 nuon/api/components/get_app_component_dependencies.py create mode 100644 nuon/api/components/get_app_component_dependents.py create mode 100644 nuon/api/components/get_app_component_latest_build.py create mode 100644 nuon/api/components/get_app_component_latest_config.py create mode 100644 nuon/api/components/get_app_components.py create mode 100644 nuon/api/components/get_build.py create mode 100644 nuon/api/components/get_component.py create mode 100644 nuon/api/components/get_component_build.py create mode 100644 nuon/api/components/get_component_builds.py create mode 100644 nuon/api/components/get_component_config.py create mode 100644 nuon/api/components/get_component_configs.py create mode 100644 nuon/api/components/get_component_dependencies.py create mode 100644 nuon/api/components/get_component_dependents.py create mode 100644 nuon/api/components/get_component_latest_build.py create mode 100644 nuon/api/components/get_component_latest_config.py create mode 100644 nuon/api/components/get_org_components.py create mode 100644 nuon/api/components/update_app_component.py create mode 100644 nuon/api/components/update_component.py create mode 100644 nuon/api/general/__init__.py create mode 100644 nuon/api/general/create_waitlist.py create mode 100644 nuon/api/general/get_cli_config.py create mode 100644 nuon/api/general/get_cloud_platform_regions.py create mode 100644 nuon/api/general/get_config_schema.py create mode 100644 nuon/api/general/get_current_user.py create mode 100644 nuon/api/installers/__init__.py create mode 100644 nuon/api/installers/create_installer.py create mode 100644 nuon/api/installers/delete_installer.py create mode 100644 nuon/api/installers/get_installer.py create mode 100644 nuon/api/installers/get_installers.py create mode 100644 nuon/api/installers/render_installer.py create mode 100644 nuon/api/installers/update_installer.py create mode 100644 nuon/api/installs/__init__.py create mode 100644 nuon/api/installs/cancel_install_workflow.py create mode 100644 nuon/api/installs/cancel_workflow.py create mode 100644 nuon/api/installs/create_install.py create mode 100644 nuon/api/installs/create_install_component_deploy.py create mode 100644 nuon/api/installs/create_install_config.py create mode 100644 nuon/api/installs/create_install_deploy.py create mode 100644 nuon/api/installs/create_install_inputs.py create mode 100644 nuon/api/installs/create_workflow_step_approval_response.py create mode 100644 nuon/api/installs/delete_install.py create mode 100644 nuon/api/installs/deploy_install_components.py create mode 100644 nuon/api/installs/deprovision_install.py create mode 100644 nuon/api/installs/deprovision_install_sandbox.py create mode 100644 nuon/api/installs/forget_install.py create mode 100644 nuon/api/installs/generate_cli_install_config.py create mode 100644 nuon/api/installs/get_app_installs.py create mode 100644 nuon/api/installs/get_current_install_inputs.py create mode 100644 nuon/api/installs/get_drifted_objects.py create mode 100644 nuon/api/installs/get_install.py create mode 100644 nuon/api/installs/get_install_action.py create mode 100644 nuon/api/installs/get_install_action_workflow.py create mode 100644 nuon/api/installs/get_install_action_workflows.py create mode 100644 nuon/api/installs/get_install_actions.py create mode 100644 nuon/api/installs/get_install_audit_logs.py create mode 100644 nuon/api/installs/get_install_component.py create mode 100644 nuon/api/installs/get_install_component_deploy.py create mode 100644 nuon/api/installs/get_install_component_deploys.py create mode 100644 nuon/api/installs/get_install_component_latest_deploy.py create mode 100644 nuon/api/installs/get_install_component_outputs.py create mode 100644 nuon/api/installs/get_install_components.py create mode 100644 nuon/api/installs/get_install_components_deploys.py create mode 100644 nuon/api/installs/get_install_components_summary.py create mode 100644 nuon/api/installs/get_install_deploy.py create mode 100644 nuon/api/installs/get_install_deploys.py create mode 100644 nuon/api/installs/get_install_event.py create mode 100644 nuon/api/installs/get_install_events.py create mode 100644 nuon/api/installs/get_install_inputs.py create mode 100644 nuon/api/installs/get_install_latest_deploy.py create mode 100644 nuon/api/installs/get_install_readme.py create mode 100644 nuon/api/installs/get_install_runner_group.py create mode 100644 nuon/api/installs/get_install_sandbox_run.py create mode 100644 nuon/api/installs/get_install_sandbox_run_v2.py create mode 100644 nuon/api/installs/get_install_sandbox_runs.py create mode 100644 nuon/api/installs/get_install_stack.py create mode 100644 nuon/api/installs/get_install_stack_by_install_id.py create mode 100644 nuon/api/installs/get_install_stack_runs.py create mode 100644 nuon/api/installs/get_install_state.py create mode 100644 nuon/api/installs/get_install_state_history.py create mode 100644 nuon/api/installs/get_install_workflow.py create mode 100644 nuon/api/installs/get_install_workflow_step.py create mode 100644 nuon/api/installs/get_install_workflow_step_approval.py create mode 100644 nuon/api/installs/get_install_workflow_steps.py create mode 100644 nuon/api/installs/get_org_installs.py create mode 100644 nuon/api/installs/get_workflow.py create mode 100644 nuon/api/installs/get_workflow_step.py create mode 100644 nuon/api/installs/get_workflow_step_approval.py create mode 100644 nuon/api/installs/get_workflow_step_approval_contents.py create mode 100644 nuon/api/installs/get_workflow_steps.py create mode 100644 nuon/api/installs/get_workflows.py create mode 100644 nuon/api/installs/phone_home.py create mode 100644 nuon/api/installs/reprovision_install.py create mode 100644 nuon/api/installs/reprovision_install_sandbox.py create mode 100644 nuon/api/installs/retry_owner_workflow_by_id.py create mode 100644 nuon/api/installs/retry_workflow.py create mode 100644 nuon/api/installs/retry_workflow_step.py create mode 100644 nuon/api/installs/sync_secrets.py create mode 100644 nuon/api/installs/teardown_install_component.py create mode 100644 nuon/api/installs/teardown_install_components.py create mode 100644 nuon/api/installs/update_install.py create mode 100644 nuon/api/installs/update_install_config.py create mode 100644 nuon/api/installs/update_install_inputs.py create mode 100644 nuon/api/installs/update_install_workflow.py create mode 100644 nuon/api/installs/update_workflow.py create mode 100644 nuon/api/orgs/__init__.py create mode 100644 nuon/api/orgs/add_user.py create mode 100644 nuon/api/orgs/create_org.py create mode 100644 nuon/api/orgs/create_org_invite.py create mode 100644 nuon/api/orgs/delete_org.py create mode 100644 nuon/api/orgs/get_org.py create mode 100644 nuon/api/orgs/get_org_acounts.py create mode 100644 nuon/api/orgs/get_org_invites.py create mode 100644 nuon/api/orgs/get_org_runner_group.py create mode 100644 nuon/api/orgs/get_orgs.py create mode 100644 nuon/api/orgs/remove_user.py create mode 100644 nuon/api/orgs/update_org.py create mode 100644 nuon/api/releases/__init__.py create mode 100644 nuon/api/releases/create_component_release.py create mode 100644 nuon/api/releases/get_app_releases.py create mode 100644 nuon/api/releases/get_component_releases.py create mode 100644 nuon/api/releases/get_release.py create mode 100644 nuon/api/releases/get_release_steps.py create mode 100644 nuon/api/runners/__init__.py create mode 100644 nuon/api/runners/cancel_runner_job.py create mode 100644 nuon/api/runners/create_terraform_workspace.py create mode 100644 nuon/api/runners/create_terraform_workspace_v2.py create mode 100644 nuon/api/runners/delete_terraform_workspace.py create mode 100644 nuon/api/runners/force_shut_down_runner.py create mode 100644 nuon/api/runners/get_latest_runner_heart_beat.py create mode 100644 nuon/api/runners/get_log_stream.py create mode 100644 nuon/api/runners/get_runner_connect_status.py create mode 100644 nuon/api/runners/get_runner_job.py create mode 100644 nuon/api/runners/get_runner_job_composite_plan.py create mode 100644 nuon/api/runners/get_runner_job_plan.py create mode 100644 nuon/api/runners/get_runner_job_plan_v2.py create mode 100644 nuon/api/runners/get_runner_job_v2.py create mode 100644 nuon/api/runners/get_runner_jobs.py create mode 100644 nuon/api/runners/get_runner_latest_heart_beat.py create mode 100644 nuon/api/runners/get_runner_recent_health_checks.py create mode 100644 nuon/api/runners/get_runner_settings.py create mode 100644 nuon/api/runners/get_terraform_current_state_data.py create mode 100644 nuon/api/runners/get_terraform_states.py create mode 100644 nuon/api/runners/get_terraform_states_v2.py create mode 100644 nuon/api/runners/get_terraform_workspace.py create mode 100644 nuon/api/runners/get_terraform_workspace_lock.py create mode 100644 nuon/api/runners/get_terraform_workspace_state_by_id.py create mode 100644 nuon/api/runners/get_terraform_workspace_state_by_idv2.py create mode 100644 nuon/api/runners/get_terraform_workspace_state_json_resources.py create mode 100644 nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py create mode 100644 nuon/api/runners/get_terraform_workspace_state_resources.py create mode 100644 nuon/api/runners/get_terraform_workspace_states_json.py create mode 100644 nuon/api/runners/get_terraform_workspace_states_json_by_id.py create mode 100644 nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py create mode 100644 nuon/api/runners/get_terraform_workspace_states_jsonv2.py create mode 100644 nuon/api/runners/get_terraform_workspaces.py create mode 100644 nuon/api/runners/graceful_shut_down_runner.py create mode 100644 nuon/api/runners/lock_terraform_workspace.py create mode 100644 nuon/api/runners/log_stream_read_logs.py create mode 100644 nuon/api/runners/mng_vm_shut_down.py create mode 100644 nuon/api/runners/shut_down_runner_mng.py create mode 100644 nuon/api/runners/unlock_terraform_workspace.py create mode 100644 nuon/api/runners/update_runner_mng.py create mode 100644 nuon/api/runners/update_runner_settings.py create mode 100644 nuon/api/runners/update_terraform_state.py create mode 100644 nuon/api/runnersrunner/__init__.py create mode 100644 nuon/api/runnersrunner/get_runner.py create mode 100644 nuon/api/runnersrunner/get_runner_job_executions.py create mode 100644 nuon/api/vcs/__init__.py create mode 100644 nuon/api/vcs/create_vcs_connection.py create mode 100644 nuon/api/vcs/create_vcs_connection_callback.py create mode 100644 nuon/api/vcs/delete_vcs_connection.py create mode 100644 nuon/api/vcs/get_org_vcs_connections.py create mode 100644 nuon/api/vcs/get_vcs_connection.py create mode 100644 nuon/client.py create mode 100644 nuon/errors.py create mode 100644 nuon/models/__init__.py create mode 100644 nuon/models/app_account.py create mode 100644 nuon/models/app_account_type.py create mode 100644 nuon/models/app_action_workflow.py create mode 100644 nuon/models/app_action_workflow_config.py create mode 100644 nuon/models/app_action_workflow_step_config.py create mode 100644 nuon/models/app_action_workflow_step_config_env_vars.py create mode 100644 nuon/models/app_action_workflow_trigger_config.py create mode 100644 nuon/models/app_action_workflow_trigger_type.py create mode 100644 nuon/models/app_app.py create mode 100644 nuon/models/app_app_awsiam_policy_config.py create mode 100644 nuon/models/app_app_awsiam_role_config.py create mode 100644 nuon/models/app_app_branch.py create mode 100644 nuon/models/app_app_break_glass_config.py create mode 100644 nuon/models/app_app_config.py create mode 100644 nuon/models/app_app_config_status.py create mode 100644 nuon/models/app_app_config_version.py create mode 100644 nuon/models/app_app_input.py create mode 100644 nuon/models/app_app_input_config.py create mode 100644 nuon/models/app_app_input_group.py create mode 100644 nuon/models/app_app_links.py create mode 100644 nuon/models/app_app_permissions_config.py create mode 100644 nuon/models/app_app_policies_config.py create mode 100644 nuon/models/app_app_runner_config.py create mode 100644 nuon/models/app_app_runner_config_env_vars.py create mode 100644 nuon/models/app_app_runner_config_helm_driver_type.py create mode 100644 nuon/models/app_app_runner_type.py create mode 100644 nuon/models/app_app_sandbox_config.py create mode 100644 nuon/models/app_app_sandbox_config_env_vars.py create mode 100644 nuon/models/app_app_sandbox_config_variables.py create mode 100644 nuon/models/app_app_secret.py create mode 100644 nuon/models/app_app_secret_config.py create mode 100644 nuon/models/app_app_secrets_config.py create mode 100644 nuon/models/app_app_stack_config.py create mode 100644 nuon/models/app_aws_account.py create mode 100644 nuon/models/app_aws_stack_outputs.py create mode 100644 nuon/models/app_aws_stack_outputs_break_glass_role_arns.py create mode 100644 nuon/models/app_awsecr_image_config.py create mode 100644 nuon/models/app_awsiam_role_type.py create mode 100644 nuon/models/app_azure_account.py create mode 100644 nuon/models/app_azure_stack_outputs.py create mode 100644 nuon/models/app_cloud_platform.py create mode 100644 nuon/models/app_cloud_platform_region.py create mode 100644 nuon/models/app_component.py create mode 100644 nuon/models/app_component_build.py create mode 100644 nuon/models/app_component_build_status.py create mode 100644 nuon/models/app_component_config_connection.py create mode 100644 nuon/models/app_component_links.py create mode 100644 nuon/models/app_component_release.py create mode 100644 nuon/models/app_component_release_step.py create mode 100644 nuon/models/app_component_type.py create mode 100644 nuon/models/app_composite_status.py create mode 100644 nuon/models/app_composite_status_metadata.py create mode 100644 nuon/models/app_connected_github_vcs_config.py create mode 100644 nuon/models/app_docker_build_component_config.py create mode 100644 nuon/models/app_docker_build_component_config_env_vars.py create mode 100644 nuon/models/app_drifted_object.py create mode 100644 nuon/models/app_external_image_component_config.py create mode 100644 nuon/models/app_helm_chart.py create mode 100644 nuon/models/app_helm_component_config.py create mode 100644 nuon/models/app_helm_component_config_values.py create mode 100644 nuon/models/app_helm_config.py create mode 100644 nuon/models/app_helm_config_values.py create mode 100644 nuon/models/app_helm_release.py create mode 100644 nuon/models/app_install.py create mode 100644 nuon/models/app_install_action_workflow.py create mode 100644 nuon/models/app_install_action_workflow_run.py create mode 100644 nuon/models/app_install_action_workflow_run_outputs.py create mode 100644 nuon/models/app_install_action_workflow_run_run_env_vars.py create mode 100644 nuon/models/app_install_action_workflow_run_step.py create mode 100644 nuon/models/app_install_action_workflow_run_step_status.py create mode 100644 nuon/models/app_install_approval_option.py create mode 100644 nuon/models/app_install_audit_log.py create mode 100644 nuon/models/app_install_component.py create mode 100644 nuon/models/app_install_component_links.py create mode 100644 nuon/models/app_install_component_statuses.py create mode 100644 nuon/models/app_install_component_summary.py create mode 100644 nuon/models/app_install_config.py create mode 100644 nuon/models/app_install_deploy.py create mode 100644 nuon/models/app_install_deploy_outputs.py create mode 100644 nuon/models/app_install_deploy_status.py create mode 100644 nuon/models/app_install_deploy_type.py create mode 100644 nuon/models/app_install_event.py create mode 100644 nuon/models/app_install_event_payload.py create mode 100644 nuon/models/app_install_inputs.py create mode 100644 nuon/models/app_install_inputs_redacted_values.py create mode 100644 nuon/models/app_install_inputs_values.py create mode 100644 nuon/models/app_install_links.py create mode 100644 nuon/models/app_install_metadata.py create mode 100644 nuon/models/app_install_sandbox.py create mode 100644 nuon/models/app_install_sandbox_run.py create mode 100644 nuon/models/app_install_sandbox_run_outputs.py create mode 100644 nuon/models/app_install_stack.py create mode 100644 nuon/models/app_install_stack_outputs.py create mode 100644 nuon/models/app_install_stack_outputs_data.py create mode 100644 nuon/models/app_install_stack_outputs_data_contents.py create mode 100644 nuon/models/app_install_stack_version.py create mode 100644 nuon/models/app_install_stack_version_run.py create mode 100644 nuon/models/app_install_stack_version_run_data.py create mode 100644 nuon/models/app_install_stack_version_run_data_contents.py create mode 100644 nuon/models/app_install_state.py create mode 100644 nuon/models/app_installer.py create mode 100644 nuon/models/app_installer_metadata.py create mode 100644 nuon/models/app_installer_type.py create mode 100644 nuon/models/app_job_component_config.py create mode 100644 nuon/models/app_job_component_config_env_vars.py create mode 100644 nuon/models/app_json_map.py create mode 100644 nuon/models/app_kubernetes_manifest_component_config.py create mode 100644 nuon/models/app_latest_runner_heart_beat.py create mode 100644 nuon/models/app_log_stream.py create mode 100644 nuon/models/app_log_stream_attrs.py create mode 100644 nuon/models/app_notifications_config.py create mode 100644 nuon/models/app_oci_artifact.py create mode 100644 nuon/models/app_oci_artifact_annotations.py create mode 100644 nuon/models/app_operation_status.py create mode 100644 nuon/models/app_org.py create mode 100644 nuon/models/app_org_invite.py create mode 100644 nuon/models/app_org_invite_status.py create mode 100644 nuon/models/app_org_links.py create mode 100644 nuon/models/app_otel_log_record.py create mode 100644 nuon/models/app_otel_log_record_log_attributes.py create mode 100644 nuon/models/app_otel_log_record_resource_attributes.py create mode 100644 nuon/models/app_otel_log_record_scope_attributes.py create mode 100644 nuon/models/app_policy.py create mode 100644 nuon/models/app_policy_name.py create mode 100644 nuon/models/app_policy_permissions.py create mode 100644 nuon/models/app_public_git_vcs_config.py create mode 100644 nuon/models/app_role.py create mode 100644 nuon/models/app_role_type.py create mode 100644 nuon/models/app_runner.py create mode 100644 nuon/models/app_runner_group.py create mode 100644 nuon/models/app_runner_group_settings.py create mode 100644 nuon/models/app_runner_group_settings_aws_tags.py create mode 100644 nuon/models/app_runner_group_settings_metadata.py create mode 100644 nuon/models/app_runner_group_type.py create mode 100644 nuon/models/app_runner_health_check.py create mode 100644 nuon/models/app_runner_heart_beat.py create mode 100644 nuon/models/app_runner_job.py create mode 100644 nuon/models/app_runner_job_execution.py create mode 100644 nuon/models/app_runner_job_execution_outputs.py create mode 100644 nuon/models/app_runner_job_execution_outputs_outputs.py create mode 100644 nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py create mode 100644 nuon/models/app_runner_job_execution_result.py create mode 100644 nuon/models/app_runner_job_execution_result_error_metadata.py create mode 100644 nuon/models/app_runner_job_execution_status.py create mode 100644 nuon/models/app_runner_job_group.py create mode 100644 nuon/models/app_runner_job_metadata.py create mode 100644 nuon/models/app_runner_job_operation_type.py create mode 100644 nuon/models/app_runner_job_outputs.py create mode 100644 nuon/models/app_runner_job_status.py create mode 100644 nuon/models/app_runner_job_type.py create mode 100644 nuon/models/app_runner_operation.py create mode 100644 nuon/models/app_runner_operation_type.py create mode 100644 nuon/models/app_runner_status.py create mode 100644 nuon/models/app_sandbox_run_type.py create mode 100644 nuon/models/app_stack_type.py create mode 100644 nuon/models/app_status.py create mode 100644 nuon/models/app_step_error_behavior.py create mode 100644 nuon/models/app_terraform_lock.py create mode 100644 nuon/models/app_terraform_module_component_config.py create mode 100644 nuon/models/app_terraform_module_component_config_env_vars.py create mode 100644 nuon/models/app_terraform_module_component_config_variables.py create mode 100644 nuon/models/app_terraform_state_instance.py create mode 100644 nuon/models/app_terraform_state_instance_attributes.py create mode 100644 nuon/models/app_terraform_state_resource.py create mode 100644 nuon/models/app_terraform_workspace.py create mode 100644 nuon/models/app_terraform_workspace_lock.py create mode 100644 nuon/models/app_terraform_workspace_state.py create mode 100644 nuon/models/app_terraform_workspace_state_json.py create mode 100644 nuon/models/app_user_journey.py create mode 100644 nuon/models/app_user_journey_step.py create mode 100644 nuon/models/app_user_journey_step_metadata.py create mode 100644 nuon/models/app_vcs_connection.py create mode 100644 nuon/models/app_vcs_connection_commit.py create mode 100644 nuon/models/app_waitlist.py create mode 100644 nuon/models/app_workflow.py create mode 100644 nuon/models/app_workflow_links.py create mode 100644 nuon/models/app_workflow_metadata.py create mode 100644 nuon/models/app_workflow_step.py create mode 100644 nuon/models/app_workflow_step_approval.py create mode 100644 nuon/models/app_workflow_step_approval_response.py create mode 100644 nuon/models/app_workflow_step_approval_type.py create mode 100644 nuon/models/app_workflow_step_execution_type.py create mode 100644 nuon/models/app_workflow_step_links.py create mode 100644 nuon/models/app_workflow_step_metadata.py create mode 100644 nuon/models/app_workflow_step_policy_validation.py create mode 100644 nuon/models/app_workflow_step_response_type.py create mode 100644 nuon/models/app_workflow_type.py create mode 100644 nuon/models/config_app_policy_type.py create mode 100644 nuon/models/configs_oci_registry_auth.py create mode 100644 nuon/models/configs_oci_registry_repository.py create mode 100644 nuon/models/configs_oci_registry_type.py create mode 100644 nuon/models/credentials_assume_role_config.py create mode 100644 nuon/models/credentials_service_principal_credentials.py create mode 100644 nuon/models/credentials_static_credentials.py create mode 100644 nuon/models/generics_null_time.py create mode 100644 nuon/models/get_app_config_template_type.py create mode 100644 nuon/models/get_config_schema_response_200.py create mode 100644 nuon/models/get_install_component_outputs_response_200.py create mode 100644 nuon/models/get_terraform_workspace_state_json_resources_response_200.py create mode 100644 nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py create mode 100644 nuon/models/get_terraform_workspace_states_json_by_id_response_200.py create mode 100644 nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py create mode 100644 nuon/models/get_workflow_step_approval_contents_response_200.py create mode 100644 nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py create mode 100644 nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py create mode 100644 nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py create mode 100644 nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py create mode 100644 nuon/models/helpers_create_install_config_params.py create mode 100644 nuon/models/helpers_install_metadata.py create mode 100644 nuon/models/iam_static_credentials.py create mode 100644 nuon/models/iam_two_step_config.py create mode 100644 nuon/models/kube_cluster_info.py create mode 100644 nuon/models/kube_cluster_info_env_vars.py create mode 100644 nuon/models/lock_terraform_workspace_body.py create mode 100644 nuon/models/outputs_secret_sync_output.py create mode 100644 nuon/models/permissions_permission.py create mode 100644 nuon/models/permissions_set.py create mode 100644 nuon/models/plantypes_action_workflow_run_plan.py create mode 100644 nuon/models/plantypes_action_workflow_run_plan_attrs.py create mode 100644 nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py create mode 100644 nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py create mode 100644 nuon/models/plantypes_action_workflow_run_step_plan.py create mode 100644 nuon/models/plantypes_action_workflow_run_step_plan_attrs.py create mode 100644 nuon/models/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py create mode 100644 nuon/models/plantypes_build_plan.py create mode 100644 nuon/models/plantypes_composite_plan.py create mode 100644 nuon/models/plantypes_container_image_pull_plan.py create mode 100644 nuon/models/plantypes_deploy_plan.py create mode 100644 nuon/models/plantypes_docker_build_plan.py create mode 100644 nuon/models/plantypes_docker_build_plan_build_args.py create mode 100644 nuon/models/plantypes_git_source.py create mode 100644 nuon/models/plantypes_helm_build_plan.py create mode 100644 nuon/models/plantypes_helm_build_plan_labels.py create mode 100644 nuon/models/plantypes_helm_deploy_plan.py create mode 100644 nuon/models/plantypes_helm_sandbox_mode.py create mode 100644 nuon/models/plantypes_helm_value.py create mode 100644 nuon/models/plantypes_kubernetes_manifest_deploy_plan.py create mode 100644 nuon/models/plantypes_kubernetes_sandbox_mode.py create mode 100644 nuon/models/plantypes_kubernetes_secret_sync.py create mode 100644 nuon/models/plantypes_noop_deploy_plan.py create mode 100644 nuon/models/plantypes_sandbox_mode.py create mode 100644 nuon/models/plantypes_sandbox_mode_outputs.py create mode 100644 nuon/models/plantypes_sandbox_run_plan.py create mode 100644 nuon/models/plantypes_sandbox_run_plan_env_vars.py create mode 100644 nuon/models/plantypes_sandbox_run_plan_policies.py create mode 100644 nuon/models/plantypes_sandbox_run_plan_vars.py create mode 100644 nuon/models/plantypes_sync_oci_plan.py create mode 100644 nuon/models/plantypes_sync_secrets_plan.py create mode 100644 nuon/models/plantypes_terraform_backend.py create mode 100644 nuon/models/plantypes_terraform_build_plan.py create mode 100644 nuon/models/plantypes_terraform_build_plan_labels.py create mode 100644 nuon/models/plantypes_terraform_deploy_hooks.py create mode 100644 nuon/models/plantypes_terraform_deploy_hooks_env_vars.py create mode 100644 nuon/models/plantypes_terraform_deploy_plan.py create mode 100644 nuon/models/plantypes_terraform_deploy_plan_env_vars.py create mode 100644 nuon/models/plantypes_terraform_deploy_plan_policies.py create mode 100644 nuon/models/plantypes_terraform_deploy_plan_vars.py create mode 100644 nuon/models/plantypes_terraform_local_archive.py create mode 100644 nuon/models/plantypes_terraform_sandbox_mode.py create mode 100644 nuon/models/refs_ref.py create mode 100644 nuon/models/refs_ref_type.py create mode 100644 nuon/models/service_app_awsiam_policy_config.py create mode 100644 nuon/models/service_app_awsiam_role_config.py create mode 100644 nuon/models/service_app_config_template.py create mode 100644 nuon/models/service_app_config_template_type.py create mode 100644 nuon/models/service_app_group_request.py create mode 100644 nuon/models/service_app_input_request.py create mode 100644 nuon/models/service_app_policy_config.py create mode 100644 nuon/models/service_app_secret_config.py create mode 100644 nuon/models/service_aws_ecr_image_config_request.py create mode 100644 nuon/models/service_build_all_components_request.py create mode 100644 nuon/models/service_cancel_runner_job_request.py create mode 100644 nuon/models/service_cli_config.py create mode 100644 nuon/models/service_component_children.py create mode 100644 nuon/models/service_connected_github_vcs_action_workflow_config_request.py create mode 100644 nuon/models/service_connected_github_vcs_config_request.py create mode 100644 nuon/models/service_connected_github_vcs_sandbox_config_request.py create mode 100644 nuon/models/service_create_action_workflow_config_request.py create mode 100644 nuon/models/service_create_action_workflow_config_step_request.py create mode 100644 nuon/models/service_create_action_workflow_config_step_request_env_vars.py create mode 100644 nuon/models/service_create_action_workflow_config_trigger_request.py create mode 100644 nuon/models/service_create_app_action_request.py create mode 100644 nuon/models/service_create_app_action_workflow_request.py create mode 100644 nuon/models/service_create_app_branch_request.py create mode 100644 nuon/models/service_create_app_break_glass_config_request.py create mode 100644 nuon/models/service_create_app_config_request.py create mode 100644 nuon/models/service_create_app_input_config_request.py create mode 100644 nuon/models/service_create_app_input_config_request_groups.py create mode 100644 nuon/models/service_create_app_input_config_request_inputs.py create mode 100644 nuon/models/service_create_app_permissions_config_request.py create mode 100644 nuon/models/service_create_app_policies_config_request.py create mode 100644 nuon/models/service_create_app_request.py create mode 100644 nuon/models/service_create_app_runner_config_request.py create mode 100644 nuon/models/service_create_app_runner_config_request_env_vars.py create mode 100644 nuon/models/service_create_app_sandbox_config_request.py create mode 100644 nuon/models/service_create_app_sandbox_config_request_env_vars.py create mode 100644 nuon/models/service_create_app_sandbox_config_request_variables.py create mode 100644 nuon/models/service_create_app_secret_request.py create mode 100644 nuon/models/service_create_app_secrets_config_request.py create mode 100644 nuon/models/service_create_app_stack_config_request.py create mode 100644 nuon/models/service_create_component_build_request.py create mode 100644 nuon/models/service_create_component_release_request.py create mode 100644 nuon/models/service_create_component_release_request_strategy.py create mode 100644 nuon/models/service_create_component_request.py create mode 100644 nuon/models/service_create_connection_callback_request.py create mode 100644 nuon/models/service_create_connection_request.py create mode 100644 nuon/models/service_create_docker_build_component_config_request.py create mode 100644 nuon/models/service_create_docker_build_component_config_request_env_vars.py create mode 100644 nuon/models/service_create_external_image_component_config_request.py create mode 100644 nuon/models/service_create_helm_component_config_request.py create mode 100644 nuon/models/service_create_helm_component_config_request_values.py create mode 100644 nuon/models/service_create_install_action_workflow_run_request.py create mode 100644 nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py create mode 100644 nuon/models/service_create_install_component_deploy_request.py create mode 100644 nuon/models/service_create_install_config_request.py create mode 100644 nuon/models/service_create_install_deploy_request.py create mode 100644 nuon/models/service_create_install_inputs_request.py create mode 100644 nuon/models/service_create_install_inputs_request_inputs.py create mode 100644 nuon/models/service_create_install_request.py create mode 100644 nuon/models/service_create_install_request_aws_account.py create mode 100644 nuon/models/service_create_install_request_azure_account.py create mode 100644 nuon/models/service_create_install_request_inputs.py create mode 100644 nuon/models/service_create_installer_request.py create mode 100644 nuon/models/service_create_installer_request_metadata.py create mode 100644 nuon/models/service_create_job_component_config_request.py create mode 100644 nuon/models/service_create_job_component_config_request_env_vars.py create mode 100644 nuon/models/service_create_kubernetes_manifest_component_config_request.py create mode 100644 nuon/models/service_create_org_invite_request.py create mode 100644 nuon/models/service_create_org_request.py create mode 100644 nuon/models/service_create_org_user_request.py create mode 100644 nuon/models/service_create_terraform_module_component_config_request.py create mode 100644 nuon/models/service_create_terraform_module_component_config_request_env_vars.py create mode 100644 nuon/models/service_create_terraform_module_component_config_request_variables.py create mode 100644 nuon/models/service_create_terraform_workspace_request.py create mode 100644 nuon/models/service_create_user_journey_request.py create mode 100644 nuon/models/service_create_user_journey_step_req.py create mode 100644 nuon/models/service_create_workflow_step_approval_response_request.py create mode 100644 nuon/models/service_create_workflow_step_approval_response_response.py create mode 100644 nuon/models/service_deploy_install_components_request.py create mode 100644 nuon/models/service_deprovision_install_request.py create mode 100644 nuon/models/service_deprovision_install_sandbox_request.py create mode 100644 nuon/models/service_force_shutdown_request.py create mode 100644 nuon/models/service_forget_install_request.py create mode 100644 nuon/models/service_graceful_shutdown_request.py create mode 100644 nuon/models/service_install_phone_home_request.py create mode 100644 nuon/models/service_latest_runner_heart_beats.py create mode 100644 nuon/models/service_mng_shut_down_request.py create mode 100644 nuon/models/service_mng_update_request.py create mode 100644 nuon/models/service_mng_vm_shut_down_request.py create mode 100644 nuon/models/service_patch_install_config_params.py create mode 100644 nuon/models/service_public_git_vcs_action_workflow_config_request.py create mode 100644 nuon/models/service_public_git_vcs_config_request.py create mode 100644 nuon/models/service_public_git_vcs_sandbox_config_request.py create mode 100644 nuon/models/service_readme.py create mode 100644 nuon/models/service_remove_org_user_request.py create mode 100644 nuon/models/service_rendered_installer.py create mode 100644 nuon/models/service_reprovision_install_request.py create mode 100644 nuon/models/service_reprovision_install_sandbox_request.py create mode 100644 nuon/models/service_retry_workflow_by_id_request.py create mode 100644 nuon/models/service_retry_workflow_by_id_response.py create mode 100644 nuon/models/service_retry_workflow_request.py create mode 100644 nuon/models/service_retry_workflow_response.py create mode 100644 nuon/models/service_retry_workflow_step_response.py create mode 100644 nuon/models/service_runner_connection_status.py create mode 100644 nuon/models/service_sync_secrets_request.py create mode 100644 nuon/models/service_teardown_install_component_request.py create mode 100644 nuon/models/service_teardown_install_components_request.py create mode 100644 nuon/models/service_update_action_workflow_request.py create mode 100644 nuon/models/service_update_app_config_installs_request.py create mode 100644 nuon/models/service_update_app_config_request.py create mode 100644 nuon/models/service_update_app_request.py create mode 100644 nuon/models/service_update_component_request.py create mode 100644 nuon/models/service_update_install_config_request.py create mode 100644 nuon/models/service_update_install_inputs_request.py create mode 100644 nuon/models/service_update_install_inputs_request_inputs.py create mode 100644 nuon/models/service_update_install_request.py create mode 100644 nuon/models/service_update_installer_request.py create mode 100644 nuon/models/service_update_installer_request_metadata.py create mode 100644 nuon/models/service_update_org_request.py create mode 100644 nuon/models/service_update_runner_settings_request.py create mode 100644 nuon/models/service_update_user_journey_step_request.py create mode 100644 nuon/models/service_update_workflow_request.py create mode 100644 nuon/models/service_waitlist_request.py create mode 100644 nuon/models/state_action_workflow_state.py create mode 100644 nuon/models/state_action_workflow_state_outputs.py create mode 100644 nuon/models/state_actions_state.py create mode 100644 nuon/models/state_actions_state_workflows.py create mode 100644 nuon/models/state_app_state.py create mode 100644 nuon/models/state_app_state_variables.py create mode 100644 nuon/models/state_aws_cloud_account.py create mode 100644 nuon/models/state_azure_cloud_account.py create mode 100644 nuon/models/state_cloud_account.py create mode 100644 nuon/models/state_domain_state.py create mode 100644 nuon/models/state_inputs_state.py create mode 100644 nuon/models/state_inputs_state_inputs.py create mode 100644 nuon/models/state_install_stack_state.py create mode 100644 nuon/models/state_install_stack_state_outputs.py create mode 100644 nuon/models/state_install_state.py create mode 100644 nuon/models/state_install_state_inputs.py create mode 100644 nuon/models/state_org_state.py create mode 100644 nuon/models/state_runner_state.py create mode 100644 nuon/models/state_sandbox_state.py create mode 100644 nuon/models/state_sandbox_state_outputs.py create mode 100644 nuon/models/state_secrets_state.py create mode 100644 nuon/models/stderr_err_response.py create mode 100644 nuon/models/types_string_bool_map.py create mode 100644 nuon/models/unlock_terraform_workspace_body.py create mode 100644 nuon/models/update_terraform_state_body.py create mode 100644 nuon/py.typed create mode 100644 nuon/types.py create mode 100644 version.txt diff --git a/nuon/__init__.py b/nuon/__init__.py new file mode 100644 index 00000000..22f4148a --- /dev/null +++ b/nuon/__init__.py @@ -0,0 +1,8 @@ +"""A client library for accessing Nuon""" + +from .client import AuthenticatedClient, Client + +__all__ = ( + "AuthenticatedClient", + "Client", +) diff --git a/nuon/api/__init__.py b/nuon/api/__init__.py new file mode 100644 index 00000000..81f9fa24 --- /dev/null +++ b/nuon/api/__init__.py @@ -0,0 +1 @@ +"""Contains methods for accessing the API""" diff --git a/nuon/api/accounts/__init__.py b/nuon/api/accounts/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/accounts/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/accounts/complete_user_journey.py b/nuon/api/accounts/complete_user_journey.py new file mode 100644 index 00000000..f5dd7ded --- /dev/null +++ b/nuon/api/accounts/complete_user_journey.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + journey_name: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/account/user-journeys/{journey_name}/complete", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + journey_name=journey_name, + client=client, + ).parsed + + +async def asyncio_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + journey_name=journey_name, + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/create_user_journey.py b/nuon/api/accounts/create_user_journey.py new file mode 100644 index 00000000..3d91f21c --- /dev/null +++ b/nuon/api/accounts/create_user_journey.py @@ -0,0 +1,188 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.service_create_user_journey_request import ServiceCreateUserJourneyRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateUserJourneyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/account/user-journeys", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAccount.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/accounts/get_current_account.py b/nuon/api/accounts/get_current_account.py new file mode 100644 index 00000000..b66fbe3c --- /dev/null +++ b/nuon/api/accounts/get_current_account.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/account", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/get_user_journeys.py b/nuon/api/accounts/get_user_journeys.py new file mode 100644 index 00000000..47ef0efa --- /dev/null +++ b/nuon/api/accounts/get_user_journeys.py @@ -0,0 +1,160 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_user_journey import AppUserJourney +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/account/user-journeys", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppUserJourney.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppUserJourney']]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppUserJourney']] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppUserJourney']]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppUserJourney']] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/reset_user_journey.py b/nuon/api/accounts/reset_user_journey.py new file mode 100644 index 00000000..8c50d2db --- /dev/null +++ b/nuon/api/accounts/reset_user_journey.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + journey_name: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/account/user-journeys/{journey_name}/reset", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + journey_name=journey_name, + client=client, + ).parsed + + +async def asyncio_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + journey_name=journey_name, + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/update_user_journey_step.py b/nuon/api/accounts/update_user_journey_step.py new file mode 100644 index 00000000..79d77ea1 --- /dev/null +++ b/nuon/api/accounts/update_user_journey_step.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.service_update_user_journey_step_request import ServiceUpdateUserJourneyStepRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + journey_name: str, + step_name: str, + *, + body: ServiceUpdateUserJourneyStepRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/account/user-journeys/{journey_name}/steps/{step_name}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + step_name=step_name, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + journey_name=journey_name, + step_name=step_name, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + step_name=step_name, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + journey_name=journey_name, + step_name=step_name, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/__init__.py b/nuon/api/actions/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/actions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/actions/create_action_config.py b/nuon/api/actions/create_action_config.py new file mode 100644 index 00000000..9b35b245 --- /dev/null +++ b/nuon/api/actions/create_action_config.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.service_create_action_workflow_config_request import ServiceCreateActionWorkflowConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, + *, + body: ServiceCreateActionWorkflowConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/actions/{action_id}/configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_action_workflow_config.py b/nuon/api/actions/create_action_workflow_config.py new file mode 100644 index 00000000..1f8e6777 --- /dev/null +++ b/nuon/api/actions/create_action_workflow_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.service_create_action_workflow_config_request import ServiceCreateActionWorkflowConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_workflow_id: str, + *, + body: ServiceCreateActionWorkflowConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/action-workflows/{action_workflow_id}/configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action workflow config + + Args: + action_workflow_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action workflow config + + Args: + action_workflow_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + action_workflow_id=action_workflow_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action workflow config + + Args: + action_workflow_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action workflow config + + Args: + action_workflow_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + action_workflow_id=action_workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_app_action.py b/nuon/api/actions/create_app_action.py new file mode 100644 index 00000000..ff5b1fb0 --- /dev/null +++ b/nuon/api/actions/create_app_action.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.service_create_app_action_request import ServiceCreateAppActionRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppActionRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/actions", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflow.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_app_action_workflow.py b/nuon/api/actions/create_app_action_workflow.py new file mode 100644 index 00000000..26dbb267 --- /dev/null +++ b/nuon/api/actions/create_app_action_workflow.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.service_create_app_action_workflow_request import ServiceCreateAppActionWorkflowRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppActionWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/action-workflows", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflow.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action workflow + + Args: + app_id (str): + body (ServiceCreateAppActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action workflow + + Args: + app_id (str): + body (ServiceCreateAppActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action workflow + + Args: + app_id (str): + body (ServiceCreateAppActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action workflow + + Args: + app_id (str): + body (ServiceCreateAppActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_install_action_run.py b/nuon/api/actions/create_install_action_run.py new file mode 100644 index 00000000..64df569e --- /dev/null +++ b/nuon/api/actions/create_install_action_run.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_create_install_action_workflow_run_request import ServiceCreateInstallActionWorkflowRunRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/actions/runs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Response[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Response[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_install_action_workflow_run.py b/nuon/api/actions/create_install_action_workflow_run.py new file mode 100644 index 00000000..15e959ce --- /dev/null +++ b/nuon/api/actions/create_install_action_workflow_run.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_create_install_action_workflow_run_request import ServiceCreateInstallActionWorkflowRunRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/action-workflows/runs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Response[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Response[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/delete_action.py b/nuon/api/actions/delete_action.py new file mode 100644 index 00000000..ef684ab7 --- /dev/null +++ b/nuon/api/actions/delete_action.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/actions/{action_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/delete_action_workflow.py b/nuon/api/actions/delete_action_workflow.py new file mode 100644 index 00000000..45d874f3 --- /dev/null +++ b/nuon/api/actions/delete_action_workflow.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/action-workflows/{action_workflow_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an action workflow + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an action workflow + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + action_workflow_id=action_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an action workflow + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an action workflow + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + action_workflow_id=action_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_action_latest_config.py b/nuon/api/actions/get_action_latest_config.py new file mode 100644 index 00000000..dae854db --- /dev/null +++ b/nuon/api/actions/get_action_latest_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/actions/{action_id}/latest-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_action_workflow.py b/nuon/api/actions/get_action_workflow.py new file mode 100644 index 00000000..0f9bf8cb --- /dev/null +++ b/nuon/api/actions/get_action_workflow.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/action-workflows/{action_workflow_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + action_workflow_id=action_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + action_workflow_id=action_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_action_workflow_config.py b/nuon/api/actions/get_action_workflow_config.py new file mode 100644 index 00000000..f0b24d8c --- /dev/null +++ b/nuon/api/actions/get_action_workflow_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_workflow_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/action-workflows/configs/{action_workflow_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow config + + Args: + action_workflow_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_config_id=action_workflow_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow config + + Args: + action_workflow_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + action_workflow_config_id=action_workflow_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + action_workflow_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow config + + Args: + action_workflow_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_config_id=action_workflow_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow config + + Args: + action_workflow_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + action_workflow_config_id=action_workflow_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_action_workflow_configs.py b/nuon/api/actions/get_action_workflow_configs.py new file mode 100644 index 00000000..b99c8a57 --- /dev/null +++ b/nuon/api/actions/get_action_workflow_configs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + action_workflow_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/action-workflows/{action_workflow_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppActionWorkflowConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflowConfig']] + """ + + return sync_detailed( + action_workflow_id=action_workflow_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflowConfig']] + """ + + return ( + await asyncio_detailed( + action_workflow_id=action_workflow_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_action_workflow_latest_config.py b/nuon/api/actions/get_action_workflow_latest_config.py new file mode 100644 index 00000000..74f7599e --- /dev/null +++ b/nuon/api/actions/get_action_workflow_latest_config.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/action-workflows/{action_workflow_id}/latest-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + action_workflow_id=action_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + action_workflow_id=action_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_action_workflows.py b/nuon/api/actions/get_action_workflows.py new file mode 100644 index 00000000..12db8f94 --- /dev/null +++ b/nuon/api/actions/get_action_workflows.py @@ -0,0 +1,242 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["q"] = q + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/action-workflows", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + """get action workflows for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflow']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + q=q, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + """get action workflows for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflow']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + q=q, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + """get action workflows for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflow']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + q=q, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + """get action workflows for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflow']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + q=q, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_app_action.py b/nuon/api/actions/get_app_action.py new file mode 100644 index 00000000..38f697c4 --- /dev/null +++ b/nuon/api/actions/get_app_action.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/actions/{action_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_app_action_config.py b/nuon/api/actions/get_app_action_config.py new file mode 100644 index 00000000..8041e30a --- /dev/null +++ b/nuon/api/actions/get_app_action_config.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, + action_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/actions/{action_id}/configs/{action_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_app_action_configs.py b/nuon/api/actions/get_app_action_configs.py new file mode 100644 index 00000000..66a76acf --- /dev/null +++ b/nuon/api/actions/get_app_action_configs.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + action_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/action/{action_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppActionWorkflowConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflowConfig']] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflowConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_app_action_workflow.py b/nuon/api/actions/get_app_action_workflow.py new file mode 100644 index 00000000..00a47b9a --- /dev/null +++ b/nuon/api/actions/get_app_action_workflow.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/action-workflows/{action_workflow_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow + + Args: + app_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_workflow_id=action_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow + + Args: + app_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_workflow_id=action_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow + + Args: + app_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_workflow_id=action_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow + + Args: + app_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_workflow_id=action_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_recent_runs.py b/nuon/api/actions/get_install_action_recent_runs.py new file mode 100644 index 00000000..6e5f6992 --- /dev/null +++ b/nuon/api/actions/get_install_action_recent_runs.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + action_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/{action_id}/recent-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_run.py b/nuon/api/actions/get_install_action_run.py new file mode 100644 index 00000000..517a693e --- /dev/null +++ b/nuon/api/actions/get_install_action_run.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/runs/{run_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflowRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRun, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_run_step.py b/nuon/api/actions/get_install_action_run_step.py new file mode 100644 index 00000000..17655826 --- /dev/null +++ b/nuon/api/actions/get_install_action_run_step.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, + step_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/runs/{run_id}/steps/{step_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflowRunStep.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + step_id=step_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + step_id=step_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + step_id=step_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + step_id=step_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_runs.py b/nuon/api/actions/get_install_action_runs.py new file mode 100644 index 00000000..a1093e94 --- /dev/null +++ b/nuon/api/actions/get_install_action_runs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflowRun.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_recent_runs.py b/nuon/api/actions/get_install_action_workflow_recent_runs.py new file mode 100644 index 00000000..d25957c0 --- /dev/null +++ b/nuon/api/actions/get_install_action_workflow_recent_runs.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + action_workflow_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows/{action_workflow_id}/recent-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_workflow_id=action_workflow_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + action_workflow_id=action_workflow_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_workflow_id=action_workflow_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_workflow_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + action_workflow_id=action_workflow_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_run.py b/nuon/api/actions/get_install_action_workflow_run.py new file mode 100644 index 00000000..9fdb3a42 --- /dev/null +++ b/nuon/api/actions/get_install_action_workflow_run.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows/runs/{run_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflowRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRun, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_run_step.py b/nuon/api/actions/get_install_action_workflow_run_step.py new file mode 100644 index 00000000..c0607d91 --- /dev/null +++ b/nuon/api/actions/get_install_action_workflow_run_step.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + workflow_run_id: str, + step_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows/runs/{workflow_run_id}/steps/{step_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflowRunStep.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + workflow_run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + workflow_run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + workflow_run_id=workflow_run_id, + step_id=step_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + workflow_run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + workflow_run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + workflow_run_id=workflow_run_id, + step_id=step_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + workflow_run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + workflow_run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + workflow_run_id=workflow_run_id, + step_id=step_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + workflow_run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + workflow_run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + workflow_run_id=workflow_run_id, + step_id=step_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_runs.py b/nuon/api/actions/get_install_action_workflow_runs.py new file mode 100644 index 00000000..b0a18fb3 --- /dev/null +++ b/nuon/api/actions/get_install_action_workflow_runs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows/runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflowRun.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_workflows_latest_runs.py b/nuon/api/actions/get_install_action_workflows_latest_runs.py new file mode 100644 index 00000000..ecb5c9c7 --- /dev/null +++ b/nuon/api/actions/get_install_action_workflows_latest_runs.py @@ -0,0 +1,257 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["trigger_types"] = trigger_types + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params["q"] = q + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows/latest-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + ).parsed diff --git a/nuon/api/actions/get_install_actions_latest_runs.py b/nuon/api/actions/get_install_actions_latest_runs.py new file mode 100644 index 00000000..947a37d4 --- /dev/null +++ b/nuon/api/actions/get_install_actions_latest_runs.py @@ -0,0 +1,257 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["trigger_types"] = trigger_types + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params["q"] = q + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/latest-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + ).parsed diff --git a/nuon/api/actions/update_app_action.py b/nuon/api/actions/update_app_action.py new file mode 100644 index 00000000..503c7b26 --- /dev/null +++ b/nuon/api/actions/update_app_action.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.service_update_action_workflow_request import ServiceUpdateActionWorkflowRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, + *, + body: ServiceUpdateActionWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/apps/{app_id}/actions/{action_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflow.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/update_app_action_workflow.py b/nuon/api/actions/update_app_action_workflow.py new file mode 100644 index 00000000..a43f36df --- /dev/null +++ b/nuon/api/actions/update_app_action_workflow.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.service_update_action_workflow_request import ServiceUpdateActionWorkflowRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_workflow_id: str, + *, + body: ServiceUpdateActionWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/action-workflows/{action_workflow_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflow.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app + + Args: + action_workflow_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app + + Args: + action_workflow_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + action_workflow_id=action_workflow_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app + + Args: + action_workflow_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + action_workflow_id=action_workflow_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app + + Args: + action_workflow_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + action_workflow_id=action_workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/__init__.py b/nuon/api/apps/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/apps/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/apps/create_app.py b/nuon/api/apps/create_app.py new file mode 100644 index 00000000..0dbc8296 --- /dev/null +++ b/nuon/api/apps/create_app.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app import AppApp +from ...models.service_create_app_request import ServiceCreateAppRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateAppRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/apps", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppApp, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppApp.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppApp, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateAppRequest, +) -> Response[Union[AppApp, StderrErrResponse]]: + """create an app + + Args: + body (ServiceCreateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppApp, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateAppRequest, +) -> Optional[Union[AppApp, StderrErrResponse]]: + """create an app + + Args: + body (ServiceCreateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppApp, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateAppRequest, +) -> Response[Union[AppApp, StderrErrResponse]]: + """create an app + + Args: + body (ServiceCreateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppApp, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateAppRequest, +) -> Optional[Union[AppApp, StderrErrResponse]]: + """create an app + + Args: + body (ServiceCreateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppApp, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_branch.py b/nuon/api/apps/create_app_branch.py new file mode 100644 index 00000000..d5333471 --- /dev/null +++ b/nuon/api/apps/create_app_branch.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_branch import AppAppBranch +from ...models.service_create_app_branch_request import ServiceCreateAppBranchRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppBranchRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/branches", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppBranch, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppBranch.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppBranch, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBranchRequest, +) -> Response[Union[AppAppBranch, StderrErrResponse]]: + """Cancel a runner job. + + Args: + app_id (str): + body (ServiceCreateAppBranchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBranch, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBranchRequest, +) -> Optional[Union[AppAppBranch, StderrErrResponse]]: + """Cancel a runner job. + + Args: + app_id (str): + body (ServiceCreateAppBranchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBranch, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBranchRequest, +) -> Response[Union[AppAppBranch, StderrErrResponse]]: + """Cancel a runner job. + + Args: + app_id (str): + body (ServiceCreateAppBranchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBranch, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBranchRequest, +) -> Optional[Union[AppAppBranch, StderrErrResponse]]: + """Cancel a runner job. + + Args: + app_id (str): + body (ServiceCreateAppBranchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBranch, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_break_glass_config.py b/nuon/api/apps/create_app_break_glass_config.py new file mode 100644 index 00000000..6e505528 --- /dev/null +++ b/nuon/api/apps/create_app_break_glass_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_break_glass_config import AppAppBreakGlassConfig +from ...models.service_create_app_break_glass_config_request import ServiceCreateAppBreakGlassConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppBreakGlassConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/break-glass-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppBreakGlassConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBreakGlassConfigRequest, +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """Create a break glass config for an app. + + Args: + app_id (str): + body (ServiceCreateAppBreakGlassConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBreakGlassConfigRequest, +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """Create a break glass config for an app. + + Args: + app_id (str): + body (ServiceCreateAppBreakGlassConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBreakGlassConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBreakGlassConfigRequest, +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """Create a break glass config for an app. + + Args: + app_id (str): + body (ServiceCreateAppBreakGlassConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppBreakGlassConfigRequest, +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """Create a break glass config for an app. + + Args: + app_id (str): + body (ServiceCreateAppBreakGlassConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBreakGlassConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_config.py b/nuon/api/apps/create_app_config.py new file mode 100644 index 00000000..dc44563f --- /dev/null +++ b/nuon/api/apps/create_app_config.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.service_create_app_config_request import ServiceCreateAppConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/config", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppConfigRequest, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppConfigRequest, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppConfigRequest, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppConfigRequest, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_input_config.py b/nuon/api/apps/create_app_input_config.py new file mode 100644 index 00000000..ea97c5a5 --- /dev/null +++ b/nuon/api/apps/create_app_input_config.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_input_config import AppAppInputConfig +from ...models.service_create_app_input_config_request import ServiceCreateAppInputConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppInputConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/input-config", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppInputConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppInputConfigRequest, +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + """App input configs allow you to declare the inputs for your application, and do things such as + require customer inputs or + expose configuration knobs in your application. + + Args: + app_id (str): + body (ServiceCreateAppInputConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppInputConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppInputConfigRequest, +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + """App input configs allow you to declare the inputs for your application, and do things such as + require customer inputs or + expose configuration knobs in your application. + + Args: + app_id (str): + body (ServiceCreateAppInputConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppInputConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppInputConfigRequest, +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + """App input configs allow you to declare the inputs for your application, and do things such as + require customer inputs or + expose configuration knobs in your application. + + Args: + app_id (str): + body (ServiceCreateAppInputConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppInputConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppInputConfigRequest, +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + """App input configs allow you to declare the inputs for your application, and do things such as + require customer inputs or + expose configuration knobs in your application. + + Args: + app_id (str): + body (ServiceCreateAppInputConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppInputConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_permissions_config.py b/nuon/api/apps/create_app_permissions_config.py new file mode 100644 index 00000000..36207c5f --- /dev/null +++ b/nuon/api/apps/create_app_permissions_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_permissions_config import AppAppPermissionsConfig +from ...models.service_create_app_permissions_config_request import ServiceCreateAppPermissionsConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppPermissionsConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/permissions-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppPermissionsConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPermissionsConfigRequest, +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """Create app permissions config. + + Args: + app_id (str): + body (ServiceCreateAppPermissionsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPermissionsConfigRequest, +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """Create app permissions config. + + Args: + app_id (str): + body (ServiceCreateAppPermissionsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPermissionsConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPermissionsConfigRequest, +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """Create app permissions config. + + Args: + app_id (str): + body (ServiceCreateAppPermissionsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPermissionsConfigRequest, +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """Create app permissions config. + + Args: + app_id (str): + body (ServiceCreateAppPermissionsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPermissionsConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_policies_config.py b/nuon/api/apps/create_app_policies_config.py new file mode 100644 index 00000000..48b21955 --- /dev/null +++ b/nuon/api/apps/create_app_policies_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_policies_config import AppAppPoliciesConfig +from ...models.service_create_app_policies_config_request import ServiceCreateAppPoliciesConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppPoliciesConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/policies-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppPoliciesConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPoliciesConfigRequest, +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """Create app policies config. + + Args: + app_id (str): + body (ServiceCreateAppPoliciesConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPoliciesConfigRequest, +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """Create app policies config. + + Args: + app_id (str): + body (ServiceCreateAppPoliciesConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPoliciesConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPoliciesConfigRequest, +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """Create app policies config. + + Args: + app_id (str): + body (ServiceCreateAppPoliciesConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppPoliciesConfigRequest, +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """Create app policies config. + + Args: + app_id (str): + body (ServiceCreateAppPoliciesConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPoliciesConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_runner_config.py b/nuon/api/apps/create_app_runner_config.py new file mode 100644 index 00000000..053e48ec --- /dev/null +++ b/nuon/api/apps/create_app_runner_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_runner_config import AppAppRunnerConfig +from ...models.service_create_app_runner_config_request import ServiceCreateAppRunnerConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppRunnerConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/runner-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppRunnerConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppRunnerConfigRequest, +) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + """create an app runner config + + Args: + app_id (str): + body (ServiceCreateAppRunnerConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppRunnerConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppRunnerConfigRequest, +) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + """create an app runner config + + Args: + app_id (str): + body (ServiceCreateAppRunnerConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppRunnerConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppRunnerConfigRequest, +) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + """create an app runner config + + Args: + app_id (str): + body (ServiceCreateAppRunnerConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppRunnerConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppRunnerConfigRequest, +) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + """create an app runner config + + Args: + app_id (str): + body (ServiceCreateAppRunnerConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppRunnerConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_sandbox_config.py b/nuon/api/apps/create_app_sandbox_config.py new file mode 100644 index 00000000..dfe904ec --- /dev/null +++ b/nuon/api/apps/create_app_sandbox_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_sandbox_config import AppAppSandboxConfig +from ...models.service_create_app_sandbox_config_request import ServiceCreateAppSandboxConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppSandboxConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/sandbox-config", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppSandboxConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSandboxConfigRequest, +) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSandboxConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSandboxConfigRequest, +) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSandboxConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSandboxConfigRequest, +) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSandboxConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSandboxConfigRequest, +) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSandboxConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_secret.py b/nuon/api/apps/create_app_secret.py new file mode 100644 index 00000000..c34d0203 --- /dev/null +++ b/nuon/api/apps/create_app_secret.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_secret import AppAppSecret +from ...models.service_create_app_secret_request import ServiceCreateAppSecretRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppSecretRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/secret", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppSecret, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppSecret.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppSecret, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretRequest, +) -> Response[Union[AppAppSecret, StderrErrResponse]]: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecret, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretRequest, +) -> Optional[Union[AppAppSecret, StderrErrResponse]]: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecret, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretRequest, +) -> Response[Union[AppAppSecret, StderrErrResponse]]: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecret, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretRequest, +) -> Optional[Union[AppAppSecret, StderrErrResponse]]: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecret, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_secrets_config.py b/nuon/api/apps/create_app_secrets_config.py new file mode 100644 index 00000000..a95f8faf --- /dev/null +++ b/nuon/api/apps/create_app_secrets_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_secrets_config import AppAppSecretsConfig +from ...models.service_create_app_secrets_config_request import ServiceCreateAppSecretsConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppSecretsConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/secrets-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppSecretsConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretsConfigRequest, +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + """Create an app secrets config. + + Args: + app_id (str): + body (ServiceCreateAppSecretsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecretsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretsConfigRequest, +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + """Create an app secrets config. + + Args: + app_id (str): + body (ServiceCreateAppSecretsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecretsConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretsConfigRequest, +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + """Create an app secrets config. + + Args: + app_id (str): + body (ServiceCreateAppSecretsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecretsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretsConfigRequest, +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + """Create an app secrets config. + + Args: + app_id (str): + body (ServiceCreateAppSecretsConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecretsConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_stack_config.py b/nuon/api/apps/create_app_stack_config.py new file mode 100644 index 00000000..b0a2d884 --- /dev/null +++ b/nuon/api/apps/create_app_stack_config.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_stack_config import AppAppStackConfig +from ...models.service_create_app_stack_config_request import ServiceCreateAppStackConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppStackConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/stack-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppStackConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppStackConfigRequest, +) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + """create an app stack config + + Create a cloudformation stack config + + Args: + app_id (str): + body (ServiceCreateAppStackConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppStackConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppStackConfigRequest, +) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + """create an app stack config + + Create a cloudformation stack config + + Args: + app_id (str): + body (ServiceCreateAppStackConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppStackConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppStackConfigRequest, +) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + """create an app stack config + + Create a cloudformation stack config + + Args: + app_id (str): + body (ServiceCreateAppStackConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppStackConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppStackConfigRequest, +) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + """create an app stack config + + Create a cloudformation stack config + + Args: + app_id (str): + body (ServiceCreateAppStackConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppStackConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/delete_app.py b/nuon/api/apps/delete_app.py new file mode 100644 index 00000000..6f11884e --- /dev/null +++ b/nuon/api/apps/delete_app.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/apps/{app_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an app + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an app + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an app + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an app + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/delete_app_secret.py b/nuon/api/apps/delete_app_secret.py new file mode 100644 index 00000000..7dba5f5a --- /dev/null +++ b/nuon/api/apps/delete_app_secret.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + secret_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/apps/{app_id}/secret/{secret_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + secret_id=secret_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + app_id=app_id, + secret_id=secret_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + secret_id=secret_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + secret_id=secret_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app.py b/nuon/api/apps/get_app.py new file mode 100644 index 00000000..078fc2ba --- /dev/null +++ b/nuon/api/apps/get_app.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app import AppApp +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppApp, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppApp.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppApp, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppApp, StderrErrResponse]]: + """get an app + + Return an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppApp, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppApp, StderrErrResponse]]: + """get an app + + Return an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppApp, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppApp, StderrErrResponse]]: + """get an app + + Return an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppApp, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppApp, StderrErrResponse]]: + """get an app + + Return an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppApp, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_branch_app_configs.py b/nuon/api/apps/get_app_branch_app_configs.py new file mode 100644 index 00000000..b7a9f756 --- /dev/null +++ b/nuon/api/apps/get_app_branch_app_configs.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + app_branch_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/branches/{app_branch_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + app_branch_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app branch app configs + + Args: + app_id (str): + app_branch_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_branch_id=app_branch_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_branch_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app branch app configs + + Args: + app_id (str): + app_branch_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppConfig']] + """ + + return sync_detailed( + app_id=app_id, + app_branch_id=app_branch_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_branch_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app branch app configs + + Args: + app_id (str): + app_branch_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_branch_id=app_branch_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_branch_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app branch app configs + + Args: + app_id (str): + app_branch_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_branch_id=app_branch_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_branches.py b/nuon/api/apps/get_app_branches.py new file mode 100644 index 00000000..83687a65 --- /dev/null +++ b/nuon/api/apps/get_app_branches.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_branch import AppAppBranch +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/branches", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppBranch.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: + """get app branches + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppBranch']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: + """get app branches + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppBranch']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: + """get app branches + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppBranch']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: + """get app branches + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppBranch']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_break_glass_config.py b/nuon/api/apps/get_app_break_glass_config.py new file mode 100644 index 00000000..8e79b418 --- /dev/null +++ b/nuon/api/apps/get_app_break_glass_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_break_glass_config import AppAppBreakGlassConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + break_glass_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/break-glass-configs/{break_glass_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppBreakGlassConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + break_glass_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get app break_glass config + + Return an app break glass config by id. + + Args: + app_id (str): + break_glass_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + break_glass_config_id=break_glass_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + break_glass_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get app break_glass config + + Return an app break glass config by id. + + Args: + app_id (str): + break_glass_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBreakGlassConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + break_glass_config_id=break_glass_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + break_glass_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get app break_glass config + + Return an app break glass config by id. + + Args: + app_id (str): + break_glass_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + break_glass_config_id=break_glass_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + break_glass_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get app break_glass config + + Return an app break glass config by id. + + Args: + app_id (str): + break_glass_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBreakGlassConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + break_glass_config_id=break_glass_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_config.py b/nuon/api/apps/get_app_config.py new file mode 100644 index 00000000..238c0515 --- /dev/null +++ b/nuon/api/apps/get_app_config.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + app_config_id: str, + *, + recurse: Union[Unset, bool] = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["recurse"] = recurse + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/config/{app_config_id}", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + recurse=recurse, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + recurse=recurse, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + recurse=recurse, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + recurse=recurse, + ) + ).parsed diff --git a/nuon/api/apps/get_app_config_graph.py b/nuon/api/apps/get_app_config_graph.py new file mode 100644 index 00000000..5ae1791a --- /dev/null +++ b/nuon/api/apps/get_app_config_graph.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + app_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/config/{app_config_id}/graph", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 200: + response_200 = cast(str, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_config_template.py b/nuon/api/apps/get_app_config_template.py new file mode 100644 index 00000000..c512cc6c --- /dev/null +++ b/nuon/api/apps/get_app_config_template.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_app_config_template_type import GetAppConfigTemplateType +from ...models.service_app_config_template import ServiceAppConfigTemplate +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response + + +def _get_kwargs( + app_id: str, + *, + type_: GetAppConfigTemplateType, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + json_type_ = type_.value + params["type"] = json_type_ + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/template-config", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + if response.status_code == 201: + response_201 = ServiceAppConfigTemplate.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + type_: GetAppConfigTemplateType, +) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + """get an app config template + + Create an application template which provides a fully rendered config that can be modified and used + to kickstart any application. + + Args: + app_id (str): + type_ (GetAppConfigTemplateType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceAppConfigTemplate, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + type_=type_, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + type_: GetAppConfigTemplateType, +) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + """get an app config template + + Create an application template which provides a fully rendered config that can be modified and used + to kickstart any application. + + Args: + app_id (str): + type_ (GetAppConfigTemplateType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceAppConfigTemplate, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + type_=type_, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + type_: GetAppConfigTemplateType, +) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + """get an app config template + + Create an application template which provides a fully rendered config that can be modified and used + to kickstart any application. + + Args: + app_id (str): + type_ (GetAppConfigTemplateType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceAppConfigTemplate, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + type_=type_, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + type_: GetAppConfigTemplateType, +) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + """get an app config template + + Create an application template which provides a fully rendered config that can be modified and used + to kickstart any application. + + Args: + app_id (str): + type_ (GetAppConfigTemplateType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceAppConfigTemplate, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + type_=type_, + ) + ).parsed diff --git a/nuon/api/apps/get_app_configs.py b/nuon/api/apps/get_app_configs.py new file mode 100644 index 00000000..86fd623d --- /dev/null +++ b/nuon/api/apps/get_app_configs.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app configs + + Returns all configs for the app. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app configs + + Returns all configs for the app. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppConfig']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app configs + + Returns all configs for the app. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + """get app configs + + Returns all configs for the app. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_input_config.py b/nuon/api/apps/get_app_input_config.py new file mode 100644 index 00000000..2f1983e3 --- /dev/null +++ b/nuon/api/apps/get_app_input_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_input_config import AppAppInputConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + input_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/input-configs/{input_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppInputConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + input_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + """get app input config + + Return an input config by id. + + Args: + app_id (str): + input_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppInputConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + input_config_id=input_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + input_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + """get app input config + + Return an input config by id. + + Args: + app_id (str): + input_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppInputConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + input_config_id=input_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + input_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + """get app input config + + Return an input config by id. + + Args: + app_id (str): + input_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppInputConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + input_config_id=input_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + input_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + """get app input config + + Return an input config by id. + + Args: + app_id (str): + input_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppInputConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + input_config_id=input_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_input_configs.py b/nuon/api/apps/get_app_input_configs.py new file mode 100644 index 00000000..d6326fba --- /dev/null +++ b/nuon/api/apps/get_app_input_configs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_input_config import AppAppInputConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/input-configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppInputConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + """get app input configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppInputConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + """get app input configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppInputConfig']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + """get app input configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppInputConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + """get app input configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppInputConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_input_latest_config.py b/nuon/api/apps/get_app_input_latest_config.py new file mode 100644 index 00000000..48bd7d5b --- /dev/null +++ b/nuon/api/apps/get_app_input_latest_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_input_config import AppAppInputConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/input-latest-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppInputConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + """get latest app input config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppInputConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + """get latest app input config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppInputConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + """get latest app input config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppInputConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + """get latest app input config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppInputConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_latest_config.py b/nuon/api/apps/get_app_latest_config.py new file mode 100644 index 00000000..4c808e04 --- /dev/null +++ b/nuon/api/apps/get_app_latest_config.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + recurse: Union[Unset, bool] = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["recurse"] = recurse + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/latest-config", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """get latest app config + + Returns the most recent config for the provided app. + + Args: + app_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + recurse=recurse, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """get latest app config + + Returns the most recent config for the provided app. + + Args: + app_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + recurse=recurse, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """get latest app config + + Returns the most recent config for the provided app. + + Args: + app_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + recurse=recurse, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + recurse: Union[Unset, bool] = False, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """get latest app config + + Returns the most recent config for the provided app. + + Args: + app_id (str): + recurse (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + recurse=recurse, + ) + ).parsed diff --git a/nuon/api/apps/get_app_permissions_config.py b/nuon/api/apps/get_app_permissions_config.py new file mode 100644 index 00000000..bd60e37f --- /dev/null +++ b/nuon/api/apps/get_app_permissions_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_permissions_config import AppAppPermissionsConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + permissions_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/permissions-configs/{permissions_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppPermissionsConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + permissions_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get app permissions config + + Return an app permissions config by id. + + Args: + app_id (str): + permissions_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + permissions_config_id=permissions_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + permissions_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get app permissions config + + Return an app permissions config by id. + + Args: + app_id (str): + permissions_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPermissionsConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + permissions_config_id=permissions_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + permissions_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get app permissions config + + Return an app permissions config by id. + + Args: + app_id (str): + permissions_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + permissions_config_id=permissions_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + permissions_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get app permissions config + + Return an app permissions config by id. + + Args: + app_id (str): + permissions_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPermissionsConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + permissions_config_id=permissions_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_policies_config.py b/nuon/api/apps/get_app_policies_config.py new file mode 100644 index 00000000..ae67f9b6 --- /dev/null +++ b/nuon/api/apps/get_app_policies_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_policies_config import AppAppPoliciesConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + policies_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/policies-configs/{policies_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppPoliciesConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + policies_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get app policies config + + Return an app policy config by id. + + Args: + app_id (str): + policies_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + policies_config_id=policies_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + policies_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get app policies config + + Return an app policy config by id. + + Args: + app_id (str): + policies_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPoliciesConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + policies_config_id=policies_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + policies_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get app policies config + + Return an app policy config by id. + + Args: + app_id (str): + policies_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + policies_config_id=policies_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + policies_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get app policies config + + Return an app policy config by id. + + Args: + app_id (str): + policies_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPoliciesConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + policies_config_id=policies_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_runner_configs.py b/nuon/api/apps/get_app_runner_configs.py new file mode 100644 index 00000000..dbc0f9e8 --- /dev/null +++ b/nuon/api/apps/get_app_runner_configs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_runner_config import AppAppRunnerConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/runner-configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppRunnerConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + """get app runner configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppRunnerConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + """get app runner configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppRunnerConfig']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + """get app runner configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppRunnerConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + """get app runner configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppRunnerConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_runner_latest_config.py b/nuon/api/apps/get_app_runner_latest_config.py new file mode 100644 index 00000000..10b13fb0 --- /dev/null +++ b/nuon/api/apps/get_app_runner_latest_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_runner_config import AppAppRunnerConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/runner-latest-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppRunnerConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + """get latest app runner config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppRunnerConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + """get latest app runner config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppRunnerConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + """get latest app runner config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppRunnerConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + """get latest app runner config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppRunnerConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_sandbox_configs.py b/nuon/api/apps/get_app_sandbox_configs.py new file mode 100644 index 00000000..0f52ba44 --- /dev/null +++ b/nuon/api/apps/get_app_sandbox_configs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_sandbox_config import AppAppSandboxConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/sandbox-configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppSandboxConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + """get app sandbox configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppSandboxConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + """get app sandbox configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppSandboxConfig']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + """get app sandbox configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppSandboxConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + """get app sandbox configs + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppSandboxConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_sandbox_latest_config.py b/nuon/api/apps/get_app_sandbox_latest_config.py new file mode 100644 index 00000000..52e1db1c --- /dev/null +++ b/nuon/api/apps/get_app_sandbox_latest_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_sandbox_config import AppAppSandboxConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/sandbox-latest-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppSandboxConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + """get latest app sandbox config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSandboxConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + """get latest app sandbox config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSandboxConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + """get latest app sandbox config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSandboxConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + """get latest app sandbox config + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSandboxConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_secrets.py b/nuon/api/apps/get_app_secrets.py new file mode 100644 index 00000000..28f49914 --- /dev/null +++ b/nuon/api/apps/get_app_secrets.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_secret import AppAppSecret +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/secrets", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppAppSecret.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: + """get app secrets + + List all secrets for an app. + + **NOTE** this does not return any sensitive values, as secrets are write only. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppSecret']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: + """get app secrets + + List all secrets for an app. + + **NOTE** this does not return any sensitive values, as secrets are write only. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppSecret']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: + """get app secrets + + List all secrets for an app. + + **NOTE** this does not return any sensitive values, as secrets are write only. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppAppSecret']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: + """get app secrets + + List all secrets for an app. + + **NOTE** this does not return any sensitive values, as secrets are write only. + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppAppSecret']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_app_secrets_config.py b/nuon/api/apps/get_app_secrets_config.py new file mode 100644 index 00000000..63dd6441 --- /dev/null +++ b/nuon/api/apps/get_app_secrets_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_secrets_config import AppAppSecretsConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + app_secrets_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/secrets-configs/{app_secrets_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppSecretsConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + app_secrets_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get app secrets config + + Return an app secrets config by id. + + Args: + app_id (str): + app_secrets_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecretsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_secrets_config_id=app_secrets_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_secrets_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get app secrets config + + Return an app secrets config by id. + + Args: + app_id (str): + app_secrets_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecretsConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + app_secrets_config_id=app_secrets_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_secrets_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get app secrets config + + Return an app secrets config by id. + + Args: + app_id (str): + app_secrets_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecretsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_secrets_config_id=app_secrets_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_secrets_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get app secrets config + + Return an app secrets config by id. + + Args: + app_id (str): + app_secrets_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecretsConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_secrets_config_id=app_secrets_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_stack_config.py b/nuon/api/apps/get_app_stack_config.py new file mode 100644 index 00000000..f0f1c315 --- /dev/null +++ b/nuon/api/apps/get_app_stack_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_stack_config import AppAppStackConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/stack-configs/{config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppStackConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + """get app stack config + + Return a cloudformation stack config + + Args: + app_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppStackConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + config_id=config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + """get app stack config + + Return a cloudformation stack config + + Args: + app_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppStackConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + config_id=config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + """get app stack config + + Return a cloudformation stack config + + Args: + app_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppStackConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + config_id=config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + """get app stack config + + Return a cloudformation stack config + + Args: + app_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppStackConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + config_id=config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_apps.py b/nuon/api/apps/get_apps.py new file mode 100644 index 00000000..b4fff9ff --- /dev/null +++ b/nuon/api/apps/get_apps.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app import AppApp +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["q"] = q + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/apps", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppApp.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppApp"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppApp"]]]: + """get all apps for the current org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppApp']]] + """ + + kwargs = _get_kwargs( + offset=offset, + q=q, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: + """get all apps for the current org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppApp']] + """ + + return sync_detailed( + client=client, + offset=offset, + q=q, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppApp"]]]: + """get all apps for the current org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppApp']]] + """ + + kwargs = _get_kwargs( + offset=offset, + q=q, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: + """get all apps for the current org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppApp']] + """ + + return ( + await asyncio_detailed( + client=client, + offset=offset, + q=q, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/apps/get_latest_app_break_glass_config.py b/nuon/api/apps/get_latest_app_break_glass_config.py new file mode 100644 index 00000000..237425b2 --- /dev/null +++ b/nuon/api/apps/get_latest_app_break_glass_config.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_break_glass_config import AppAppBreakGlassConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/latest-app-break-glass-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppBreakGlassConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get latest app break glass config + + Get the latest break glass config for an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get latest app break glass config + + Get the latest break glass config for an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBreakGlassConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get latest app break glass config + + Get the latest break glass config for an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + """get latest app break glass config + + Get the latest break glass config for an app. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppBreakGlassConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_latest_app_permissions_config.py b/nuon/api/apps/get_latest_app_permissions_config.py new file mode 100644 index 00000000..3dcd61e0 --- /dev/null +++ b/nuon/api/apps/get_latest_app_permissions_config.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_permissions_config import AppAppPermissionsConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/latest-app-permissions-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppPermissionsConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get latest app permissions config + + Get the latest app permissions config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get latest app permissions config + + Get the latest app permissions config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPermissionsConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get latest app permissions config + + Get the latest app permissions config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + """get latest app permissions config + + Get the latest app permissions config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPermissionsConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_latest_app_policies_config.py b/nuon/api/apps/get_latest_app_policies_config.py new file mode 100644 index 00000000..ace2571b --- /dev/null +++ b/nuon/api/apps/get_latest_app_policies_config.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_policies_config import AppAppPoliciesConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/latest-app-policies-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppPoliciesConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get latest app policies config + + Get latest app policies config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get latest app policies config + + Get latest app policies config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPoliciesConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get latest app policies config + + Get latest app policies config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + """get latest app policies config + + Get latest app policies config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppPoliciesConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_latest_app_secrets_config.py b/nuon/api/apps/get_latest_app_secrets_config.py new file mode 100644 index 00000000..49ac7897 --- /dev/null +++ b/nuon/api/apps/get_latest_app_secrets_config.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_secrets_config import AppAppSecretsConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/latest-app-secrets-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAppSecretsConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get latest app secrets config + + Get the latest app secrets config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecretsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get latest app secrets config + + Get the latest app secrets config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecretsConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get latest app secrets config + + Get the latest app secrets config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppSecretsConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + """get latest app secrets config + + Get the latest app secrets config. + + Args: + app_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppSecretsConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/update_app.py b/nuon/api/apps/update_app.py new file mode 100644 index 00000000..c86fa855 --- /dev/null +++ b/nuon/api/apps/update_app.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app import AppApp +from ...models.service_update_app_request import ServiceUpdateAppRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceUpdateAppRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/apps/{app_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppApp, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppApp.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppApp, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppRequest, +) -> Response[Union[AppApp, StderrErrResponse]]: + """update an app + + Args: + app_id (str): + body (ServiceUpdateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppApp, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppRequest, +) -> Optional[Union[AppApp, StderrErrResponse]]: + """update an app + + Args: + app_id (str): + body (ServiceUpdateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppApp, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppRequest, +) -> Response[Union[AppApp, StderrErrResponse]]: + """update an app + + Args: + app_id (str): + body (ServiceUpdateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppApp, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppRequest, +) -> Optional[Union[AppApp, StderrErrResponse]]: + """update an app + + Args: + app_id (str): + body (ServiceUpdateAppRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppApp, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/update_app_config.py b/nuon/api/apps/update_app_config.py new file mode 100644 index 00000000..b0656c1a --- /dev/null +++ b/nuon/api/apps/update_app_config.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.service_update_app_config_request import ServiceUpdateAppConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + app_config_id: str, + *, + body: ServiceUpdateAppConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/apps/{app_id}/config/{app_config_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAppConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigRequest, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """Update an app config, setting status and state. + + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigRequest, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """Update an app config, setting status and state. + + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigRequest, +) -> Response[Union[AppAppConfig, StderrErrResponse]]: + """Update an app config, setting status and state. + + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAppConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigRequest, +) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + """Update an app config, setting status and state. + + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAppConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/update_app_config_installs.py b/nuon/api/apps/update_app_config_installs.py new file mode 100644 index 00000000..2a245d8f --- /dev/null +++ b/nuon/api/apps/update_app_config_installs.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_update_app_config_installs_request import ServiceUpdateAppConfigInstallsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + app_config_id: str, + *, + body: ServiceUpdateAppConfigInstallsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/config/{app_config_id}/update-installs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 200: + response_200 = cast(str, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigInstallsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """ + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigInstallsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigInstallsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """ + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigInstallsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigInstallsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """ + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigInstallsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateAppConfigInstallsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """ + Args: + app_id (str): + app_config_id (str): + body (ServiceUpdateAppConfigInstallsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/__init__.py b/nuon/api/components/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/components/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/components/build_all_components.py b/nuon/api/components/build_all_components.py new file mode 100644 index 00000000..e7a1cc36 --- /dev/null +++ b/nuon/api/components/build_all_components.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.service_build_all_components_request import ServiceBuildAllComponentsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceBuildAllComponentsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/build-all", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + if response.status_code == 201: + response_201 = [] + _response_201 = response.json() + for response_201_item_data in _response_201: + response_201_item = AppComponentBuild.from_dict(response_201_item_data) + + response_201.append(response_201_item) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_component_build.py b/nuon/api/components/create_app_component_build.py new file mode 100644 index 00000000..4fbfa030 --- /dev/null +++ b/nuon/api/components/create_app_component_build.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.service_create_component_build_request import ServiceCreateComponentBuildRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateComponentBuildRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppComponentBuild.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_docker_build_component_config.py b/nuon/api/components/create_app_docker_build_component_config.py new file mode 100644 index 00000000..d0f4c067 --- /dev/null +++ b/nuon/api/components/create_app_docker_build_component_config.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_docker_build_component_config import AppDockerBuildComponentConfig +from ...models.service_create_docker_build_component_config_request import ( + ServiceCreateDockerBuildComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/docker-build", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppDockerBuildComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppDockerBuildComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppDockerBuildComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_helm_component_config.py b/nuon/api/components/create_app_helm_component_config.py new file mode 100644 index 00000000..9ffc2ee4 --- /dev/null +++ b/nuon/api/components/create_app_helm_component_config.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_helm_component_config import AppHelmComponentConfig +from ...models.service_create_helm_component_config_request import ServiceCreateHelmComponentConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateHelmComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/helm", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppHelmComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppHelmComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppHelmComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppHelmComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppHelmComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_kubernetes_manifest_component_config.py b/nuon/api/components/create_app_kubernetes_manifest_component_config.py new file mode 100644 index 00000000..383bbf42 --- /dev/null +++ b/nuon/api/components/create_app_kubernetes_manifest_component_config.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig +from ...models.service_create_kubernetes_manifest_component_config_request import ( + ServiceCreateKubernetesManifestComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/kubernetes-manifest", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppKubernetesManifestComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_terraform_module_component_config.py b/nuon/api/components/create_app_terraform_module_component_config.py new file mode 100644 index 00000000..90d82ed0 --- /dev/null +++ b/nuon/api/components/create_app_terraform_module_component_config.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_module_component_config import AppTerraformModuleComponentConfig +from ...models.service_create_terraform_module_component_config_request import ( + ServiceCreateTerraformModuleComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/terraform-module", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppTerraformModuleComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformModuleComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformModuleComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_component.py b/nuon/api/components/create_component.py new file mode 100644 index 00000000..86c12e3d --- /dev/null +++ b/nuon/api/components/create_component.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.service_create_component_request import ServiceCreateComponentRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateComponentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponent, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppComponent.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """create a component + + Args: + app_id (str): + body (ServiceCreateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """create a component + + Args: + app_id (str): + body (ServiceCreateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """create a component + + Args: + app_id (str): + body (ServiceCreateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """create a component + + Args: + app_id (str): + body (ServiceCreateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_component_build.py b/nuon/api/components/create_component_build.py new file mode 100644 index 00000000..73661cf0 --- /dev/null +++ b/nuon/api/components/create_component_build.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.service_create_component_build_request import ServiceCreateComponentBuildRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateComponentBuildRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/builds", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppComponentBuild.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_docker_build_component_config.py b/nuon/api/components/create_docker_build_component_config.py new file mode 100644 index 00000000..28030383 --- /dev/null +++ b/nuon/api/components/create_docker_build_component_config.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_docker_build_component_config import AppDockerBuildComponentConfig +from ...models.service_create_docker_build_component_config_request import ( + ServiceCreateDockerBuildComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/configs/docker-build", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppDockerBuildComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppDockerBuildComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppDockerBuildComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_external_image_component_config.py b/nuon/api/components/create_external_image_component_config.py new file mode 100644 index 00000000..7fc500d1 --- /dev/null +++ b/nuon/api/components/create_external_image_component_config.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_external_image_component_config import AppExternalImageComponentConfig +from ...models.service_create_external_image_component_config_request import ( + ServiceCreateExternalImageComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateExternalImageComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/configs/external-image", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppExternalImageComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateExternalImageComponentConfigRequest, +) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + """create an external image component config + + Args: + component_id (str): + body (ServiceCreateExternalImageComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppExternalImageComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateExternalImageComponentConfigRequest, +) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + """create an external image component config + + Args: + component_id (str): + body (ServiceCreateExternalImageComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppExternalImageComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateExternalImageComponentConfigRequest, +) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + """create an external image component config + + Args: + component_id (str): + body (ServiceCreateExternalImageComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppExternalImageComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateExternalImageComponentConfigRequest, +) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + """create an external image component config + + Args: + component_id (str): + body (ServiceCreateExternalImageComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppExternalImageComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_helm_component_config.py b/nuon/api/components/create_helm_component_config.py new file mode 100644 index 00000000..28ff8ea2 --- /dev/null +++ b/nuon/api/components/create_helm_component_config.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_helm_component_config import AppHelmComponentConfig +from ...models.service_create_helm_component_config_request import ServiceCreateHelmComponentConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateHelmComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/configs/helm", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppHelmComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppHelmComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppHelmComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppHelmComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppHelmComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_job_component_config.py b/nuon/api/components/create_job_component_config.py new file mode 100644 index 00000000..db32eab2 --- /dev/null +++ b/nuon/api/components/create_job_component_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_job_component_config import AppJobComponentConfig +from ...models.service_create_job_component_config_request import ServiceCreateJobComponentConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateJobComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/configs/job", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppJobComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateJobComponentConfigRequest, +) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: + """create a job component config + + Args: + component_id (str): + body (ServiceCreateJobComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppJobComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateJobComponentConfigRequest, +) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: + """create a job component config + + Args: + component_id (str): + body (ServiceCreateJobComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppJobComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateJobComponentConfigRequest, +) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: + """create a job component config + + Args: + component_id (str): + body (ServiceCreateJobComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppJobComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateJobComponentConfigRequest, +) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: + """create a job component config + + Args: + component_id (str): + body (ServiceCreateJobComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppJobComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_kubernetes_manifest_component_config.py b/nuon/api/components/create_kubernetes_manifest_component_config.py new file mode 100644 index 00000000..5ae46a12 --- /dev/null +++ b/nuon/api/components/create_kubernetes_manifest_component_config.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig +from ...models.service_create_kubernetes_manifest_component_config_request import ( + ServiceCreateKubernetesManifestComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/configs/kubernetes-manifest", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppKubernetesManifestComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_terraform_module_component_config.py b/nuon/api/components/create_terraform_module_component_config.py new file mode 100644 index 00000000..7953122c --- /dev/null +++ b/nuon/api/components/create_terraform_module_component_config.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_module_component_config import AppTerraformModuleComponentConfig +from ...models.service_create_terraform_module_component_config_request import ( + ServiceCreateTerraformModuleComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/configs/terraform-module", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppTerraformModuleComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformModuleComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformModuleComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/delete_app_component.py b/nuon/api/components/delete_app_component.py new file mode 100644 index 00000000..902bc99c --- /dev/null +++ b/nuon/api/components/delete_app_component.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/apps/{app_id}/components/{component_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/delete_component.py b/nuon/api/components/delete_component.py new file mode 100644 index 00000000..814015cd --- /dev/null +++ b/nuon/api/components/delete_component.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/components/{component_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component.py b/nuon/api/components/get_app_component.py new file mode 100644 index 00000000..80b0a5aa --- /dev/null +++ b/nuon/api/components/get_app_component.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_name_or_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/component/{component_name_or_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_name_or_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """get a components for a specific app + + Return an app component by id or name. + + Args: + app_id (str): + component_name_or_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_name_or_id=component_name_or_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_name_or_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """get a components for a specific app + + Return an app component by id or name. + + Args: + app_id (str): + component_name_or_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_name_or_id=component_name_or_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_name_or_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """get a components for a specific app + + Return an app component by id or name. + + Args: + app_id (str): + component_name_or_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_name_or_id=component_name_or_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_name_or_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """get a components for a specific app + + Return an app component by id or name. + + Args: + app_id (str): + component_name_or_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_name_or_id=component_name_or_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_build.py b/nuon/api/components/get_app_component_build.py new file mode 100644 index 00000000..d2e3b574 --- /dev/null +++ b/nuon/api/components/get_app_component_build.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + build_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds/{build_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + build_id=build_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + build_id=build_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + build_id=build_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + build_id=build_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_builds.py b/nuon/api/components/get_app_component_builds.py new file mode 100644 index 00000000..4d4d13a4 --- /dev/null +++ b/nuon/api/components/get_app_component_builds.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentBuild.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_config.py b/nuon/api/components/get_app_component_config.py new file mode 100644 index 00000000..f0bed02f --- /dev/null +++ b/nuon/api/components/get_app_component_config.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/{config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentConfigConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + config_id=config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + config_id=config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + config_id=config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + config_id=config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_configs.py b/nuon/api/components/get_app_component_configs.py new file mode 100644 index 00000000..055dad5c --- /dev/null +++ b/nuon/api/components/get_app_component_configs.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentConfigConnection.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentConfigConnection']] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentConfigConnection']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_dependencies.py b/nuon/api/components/get_app_component_dependencies.py new file mode 100644 index 00000000..fd92e74c --- /dev/null +++ b/nuon/api/components/get_app_component_dependencies.py @@ -0,0 +1,189 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/dependencies", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_dependents.py b/nuon/api/components/get_app_component_dependents.py new file mode 100644 index 00000000..d5d2d5b8 --- /dev/null +++ b/nuon/api/components/get_app_component_dependents.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_component_children import ServiceComponentChildren +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/dependents", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceComponentChildren.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceComponentChildren, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceComponentChildren, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceComponentChildren, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceComponentChildren, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_latest_build.py b/nuon/api/components/get_app_component_latest_build.py new file mode 100644 index 00000000..aba730b2 --- /dev/null +++ b/nuon/api/components/get_app_component_latest_build.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_latest_config.py b/nuon/api/components/get_app_component_latest_config.py new file mode 100644 index 00000000..dc35db41 --- /dev/null +++ b/nuon/api/components/get_app_component_latest_config.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentConfigConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_components.py b/nuon/api/components/get_app_components.py new file mode 100644 index 00000000..4df2ea92 --- /dev/null +++ b/nuon/api/components/get_app_components.py @@ -0,0 +1,272 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + q: Union[Unset, str] = UNSET, + types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["q"] = q + + params["types"] = types + + params["component_ids"] = component_ids + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an app + + Args: + app_id (str): + q (Union[Unset, str]): + types (Union[Unset, str]): + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + q=q, + types=types, + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an app + + Args: + app_id (str): + q (Union[Unset, str]): + types (Union[Unset, str]): + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + q=q, + types=types, + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an app + + Args: + app_id (str): + q (Union[Unset, str]): + types (Union[Unset, str]): + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + q=q, + types=types, + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an app + + Args: + app_id (str): + q (Union[Unset, str]): + types (Union[Unset, str]): + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + q=q, + types=types, + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_build.py b/nuon/api/components/get_build.py new file mode 100644 index 00000000..3cc314dc --- /dev/null +++ b/nuon/api/components/get_build.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + build_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/builds/{build_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build + + Returns builds for one or all components in an app. + + Args: + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + build_id=build_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build + + Returns builds for one or all components in an app. + + Args: + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + build_id=build_id, + client=client, + ).parsed + + +async def asyncio_detailed( + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build + + Returns builds for one or all components in an app. + + Args: + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + build_id=build_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build + + Returns builds for one or all components in an app. + + Args: + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + build_id=build_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component.py b/nuon/api/components/get_component.py new file mode 100644 index 00000000..db82cb83 --- /dev/null +++ b/nuon/api/components/get_component.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """get a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """get a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """get a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """get a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component_build.py b/nuon/api/components/get_component_build.py new file mode 100644 index 00000000..592e9cf8 --- /dev/null +++ b/nuon/api/components/get_component_build.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + build_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/builds/{build_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + build_id=build_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + build_id=build_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + build_id=build_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + build_id=build_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component_builds.py b/nuon/api/components/get_component_builds.py new file mode 100644 index 00000000..40405cc3 --- /dev/null +++ b/nuon/api/components/get_component_builds.py @@ -0,0 +1,244 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + component_id: Union[Unset, str] = UNSET, + app_id: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["component_id"] = component_id + + params["app_id"] = app_id + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/builds", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentBuild.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + component_id: Union[Unset, str] = UNSET, + app_id: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + component_id (Union[Unset, str]): + app_id (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + component_id: Union[Unset, str] = UNSET, + app_id: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + component_id (Union[Unset, str]): + app_id (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return sync_detailed( + client=client, + component_id=component_id, + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + component_id: Union[Unset, str] = UNSET, + app_id: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + component_id (Union[Unset, str]): + app_id (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + component_id: Union[Unset, str] = UNSET, + app_id: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + component_id (Union[Unset, str]): + app_id (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return ( + await asyncio_detailed( + client=client, + component_id=component_id, + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_component_config.py b/nuon/api/components/get_component_config.py new file mode 100644 index 00000000..6de96fb6 --- /dev/null +++ b/nuon/api/components/get_component_config.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/configs/{config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentConfigConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + config_id=config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + config_id=config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + config_id=config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + config_id=config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component_configs.py b/nuon/api/components/get_component_configs.py new file mode 100644 index 00000000..7b1d1e03 --- /dev/null +++ b/nuon/api/components/get_component_configs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentConfigConnection.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentConfigConnection']] + """ + + return sync_detailed( + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentConfigConnection']] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_component_dependencies.py b/nuon/api/components/get_component_dependencies.py new file mode 100644 index 00000000..385846ff --- /dev/null +++ b/nuon/api/components/get_component_dependencies.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/dependencies", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return sync_detailed( + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component_dependents.py b/nuon/api/components/get_component_dependents.py new file mode 100644 index 00000000..b334df5e --- /dev/null +++ b/nuon/api/components/get_component_dependents.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_component_children import ServiceComponentChildren +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/dependents", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceComponentChildren.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceComponentChildren, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceComponentChildren, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceComponentChildren, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceComponentChildren, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component_latest_build.py b/nuon/api/components/get_component_latest_build.py new file mode 100644 index 00000000..a4c515ed --- /dev/null +++ b/nuon/api/components/get_component_latest_build.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/builds/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_component_latest_config.py b/nuon/api/components/get_component_latest_config.py new file mode 100644 index 00000000..5288f255 --- /dev/null +++ b/nuon/api/components/get_component_latest_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/configs/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentConfigConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_org_components.py b/nuon/api/components/get_org_components.py new file mode 100644 index 00000000..953dd651 --- /dev/null +++ b/nuon/api/components/get_org_components.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["component_ids"] = component_ids + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/components", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an org + + Args: + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an org + + Args: + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return sync_detailed( + client=client, + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an org + + Args: + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get all components for an org + + Args: + component_ids (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return ( + await asyncio_detailed( + client=client, + component_ids=component_ids, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/update_app_component.py b/nuon/api/components/update_app_component.py new file mode 100644 index 00000000..3e48bf9f --- /dev/null +++ b/nuon/api/components/update_app_component.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.service_update_component_request import ServiceUpdateComponentRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceUpdateComponentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/apps/{app_id}/components/{component_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/update_component.py b/nuon/api/components/update_component.py new file mode 100644 index 00000000..2fe7c69a --- /dev/null +++ b/nuon/api/components/update_component.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.service_update_component_request import ServiceUpdateComponentRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceUpdateComponentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/components/{component_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/general/__init__.py b/nuon/api/general/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/general/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/general/create_waitlist.py b/nuon/api/general/create_waitlist.py new file mode 100644 index 00000000..d8fca277 --- /dev/null +++ b/nuon/api/general/create_waitlist.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_waitlist import AppWaitlist +from ...models.service_waitlist_request import ServiceWaitlistRequest +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceWaitlistRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/general/waitlist", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[AppWaitlist]: + if response.status_code == 200: + response_200 = AppWaitlist.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[AppWaitlist]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceWaitlistRequest, +) -> Response[AppWaitlist]: + """Allow user to be added to an org waitlist. + + Args: + body (ServiceWaitlistRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AppWaitlist] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceWaitlistRequest, +) -> Optional[AppWaitlist]: + """Allow user to be added to an org waitlist. + + Args: + body (ServiceWaitlistRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AppWaitlist + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceWaitlistRequest, +) -> Response[AppWaitlist]: + """Allow user to be added to an org waitlist. + + Args: + body (ServiceWaitlistRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AppWaitlist] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceWaitlistRequest, +) -> Optional[AppWaitlist]: + """Allow user to be added to an org waitlist. + + Args: + body (ServiceWaitlistRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AppWaitlist + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/general/get_cli_config.py b/nuon/api/general/get_cli_config.py new file mode 100644 index 00000000..1f6083c4 --- /dev/null +++ b/nuon/api/general/get_cli_config.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_cli_config import ServiceCLIConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/general/cli-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceCLIConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: + """Get config for cli + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceCLIConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: + """Get config for cli + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceCLIConfig, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: + """Get config for cli + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceCLIConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: + """Get config for cli + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceCLIConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/general/get_cloud_platform_regions.py b/nuon/api/general/get_cloud_platform_regions.py new file mode 100644 index 00000000..3d37ba95 --- /dev/null +++ b/nuon/api/general/get_cloud_platform_regions.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_cloud_platform_region import AppCloudPlatformRegion +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + cloud_platform: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/general/cloud-platform/{cloud_platform}/regions", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppCloudPlatformRegion.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cloud_platform: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + """Get regions for a cloud platform + + Return region metadata for the Nuon supported cloud platforms. + + Args: + cloud_platform (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppCloudPlatformRegion']]] + """ + + kwargs = _get_kwargs( + cloud_platform=cloud_platform, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cloud_platform: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + """Get regions for a cloud platform + + Return region metadata for the Nuon supported cloud platforms. + + Args: + cloud_platform (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppCloudPlatformRegion']] + """ + + return sync_detailed( + cloud_platform=cloud_platform, + client=client, + ).parsed + + +async def asyncio_detailed( + cloud_platform: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + """Get regions for a cloud platform + + Return region metadata for the Nuon supported cloud platforms. + + Args: + cloud_platform (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppCloudPlatformRegion']]] + """ + + kwargs = _get_kwargs( + cloud_platform=cloud_platform, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cloud_platform: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + """Get regions for a cloud platform + + Return region metadata for the Nuon supported cloud platforms. + + Args: + cloud_platform (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppCloudPlatformRegion']] + """ + + return ( + await asyncio_detailed( + cloud_platform=cloud_platform, + client=client, + ) + ).parsed diff --git a/nuon/api/general/get_config_schema.py b/nuon/api/general/get_config_schema.py new file mode 100644 index 00000000..80485829 --- /dev/null +++ b/nuon/api/general/get_config_schema.py @@ -0,0 +1,271 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_config_schema_response_200 import GetConfigSchemaResponse200 +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + type_: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["type"] = type_ + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/general/config-schema", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetConfigSchemaResponse200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + type_: Union[Unset, str] = UNSET, +) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + r"""Get jsonschema for config file + + Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a + TOML LSP (such as + [Taplo](https://taplo.tamasfe.dev/) configured. + + ```toml + #:schema https://api.nuon.co/v1/general/config-schema?source=inputs + + description = \"description\" + ``` + + You can pass in a valid source argument to render within a specific config file: + + - input + - input-group + - installer + - sandbox + - runner + - docker_build + - container_image + - helm + - terraform + - job + + Args: + type_ (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetConfigSchemaResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + type_=type_, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Union[AuthenticatedClient, Client], + type_: Union[Unset, str] = UNSET, +) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + r"""Get jsonschema for config file + + Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a + TOML LSP (such as + [Taplo](https://taplo.tamasfe.dev/) configured. + + ```toml + #:schema https://api.nuon.co/v1/general/config-schema?source=inputs + + description = \"description\" + ``` + + You can pass in a valid source argument to render within a specific config file: + + - input + - input-group + - installer + - sandbox + - runner + - docker_build + - container_image + - helm + - terraform + - job + + Args: + type_ (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetConfigSchemaResponse200, StderrErrResponse] + """ + + return sync_detailed( + client=client, + type_=type_, + ).parsed + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + type_: Union[Unset, str] = UNSET, +) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + r"""Get jsonschema for config file + + Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a + TOML LSP (such as + [Taplo](https://taplo.tamasfe.dev/) configured. + + ```toml + #:schema https://api.nuon.co/v1/general/config-schema?source=inputs + + description = \"description\" + ``` + + You can pass in a valid source argument to render within a specific config file: + + - input + - input-group + - installer + - sandbox + - runner + - docker_build + - container_image + - helm + - terraform + - job + + Args: + type_ (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetConfigSchemaResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + type_=type_, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: Union[AuthenticatedClient, Client], + type_: Union[Unset, str] = UNSET, +) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + r"""Get jsonschema for config file + + Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a + TOML LSP (such as + [Taplo](https://taplo.tamasfe.dev/) configured. + + ```toml + #:schema https://api.nuon.co/v1/general/config-schema?source=inputs + + description = \"description\" + ``` + + You can pass in a valid source argument to render within a specific config file: + + - input + - input-group + - installer + - sandbox + - runner + - docker_build + - container_image + - helm + - terraform + - job + + Args: + type_ (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetConfigSchemaResponse200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + type_=type_, + ) + ).parsed diff --git a/nuon/api/general/get_current_user.py b/nuon/api/general/get_current_user.py new file mode 100644 index 00000000..b88806ce --- /dev/null +++ b/nuon/api/general/get_current_user.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/general/current-user", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get current user + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get current user + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get current user + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get current user + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/installers/__init__.py b/nuon/api/installers/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/installers/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/installers/create_installer.py b/nuon/api/installers/create_installer.py new file mode 100644 index 00000000..4142f89e --- /dev/null +++ b/nuon/api/installers/create_installer.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_installer import AppInstaller +from ...models.service_create_installer_request import ServiceCreateInstallerRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateInstallerRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/installers", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstaller.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstaller, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateInstallerRequest, +) -> Response[Union[AppInstaller, StderrErrResponse]]: + """create an installer + + Args: + body (ServiceCreateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateInstallerRequest, +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + """create an installer + + Args: + body (ServiceCreateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstaller, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateInstallerRequest, +) -> Response[Union[AppInstaller, StderrErrResponse]]: + """create an installer + + Args: + body (ServiceCreateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateInstallerRequest, +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + """create an installer + + Args: + body (ServiceCreateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstaller, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installers/delete_installer.py b/nuon/api/installers/delete_installer.py new file mode 100644 index 00000000..2599263d --- /dev/null +++ b/nuon/api/installers/delete_installer.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + installer_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/installers/{installer_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + installer_id=installer_id, + client=client, + ).parsed + + +async def asyncio_detailed( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + installer_id=installer_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installers/get_installer.py b/nuon/api/installers/get_installer.py new file mode 100644 index 00000000..37330757 --- /dev/null +++ b/nuon/api/installers/get_installer.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_installer import AppInstaller +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + installer_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installers/{installer_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstaller.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstaller, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstaller, StderrErrResponse]]: + """get an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + """get an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstaller, StderrErrResponse] + """ + + return sync_detailed( + installer_id=installer_id, + client=client, + ).parsed + + +async def asyncio_detailed( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstaller, StderrErrResponse]]: + """get an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + installer_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + """get an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstaller, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + installer_id=installer_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installers/get_installers.py b/nuon/api/installers/get_installers.py new file mode 100644 index 00000000..a9546faa --- /dev/null +++ b/nuon/api/installers/get_installers.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_installer import AppInstaller +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/installers", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstaller.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: + """get installers for current org + + Return all installers for the current org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstaller']]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: + """get installers for current org + + Return all installers for the current org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstaller']] + """ + + return sync_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: + """get installers for current org + + Return all installers for the current org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstaller']]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: + """get installers for current org + + Return all installers for the current org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstaller']] + """ + + return ( + await asyncio_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installers/render_installer.py b/nuon/api/installers/render_installer.py new file mode 100644 index 00000000..9c03a533 --- /dev/null +++ b/nuon/api/installers/render_installer.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_rendered_installer import ServiceRenderedInstaller +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + installer_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installer/{installer_id}/render", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceRenderedInstaller.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + installer_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: + """render an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRenderedInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + installer_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: + """render an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRenderedInstaller, StderrErrResponse] + """ + + return sync_detailed( + installer_id=installer_id, + client=client, + ).parsed + + +async def asyncio_detailed( + installer_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: + """render an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRenderedInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + installer_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: + """render an installer + + Args: + installer_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRenderedInstaller, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + installer_id=installer_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installers/update_installer.py b/nuon/api/installers/update_installer.py new file mode 100644 index 00000000..456bf056 --- /dev/null +++ b/nuon/api/installers/update_installer.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_installer import AppInstaller +from ...models.service_update_installer_request import ServiceUpdateInstallerRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + installer_id: str, + *, + body: ServiceUpdateInstallerRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/installers/{installer_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstaller.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstaller, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + installer_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallerRequest, +) -> Response[Union[AppInstaller, StderrErrResponse]]: + """update an installer + + Args: + installer_id (str): + body (ServiceUpdateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + installer_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallerRequest, +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + """update an installer + + Args: + installer_id (str): + body (ServiceUpdateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstaller, StderrErrResponse] + """ + + return sync_detailed( + installer_id=installer_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + installer_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallerRequest, +) -> Response[Union[AppInstaller, StderrErrResponse]]: + """update an installer + + Args: + installer_id (str): + body (ServiceUpdateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstaller, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + installer_id=installer_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + installer_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallerRequest, +) -> Optional[Union[AppInstaller, StderrErrResponse]]: + """update an installer + + Args: + installer_id (str): + body (ServiceUpdateInstallerRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstaller, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + installer_id=installer_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/__init__.py b/nuon/api/installs/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/installs/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/installs/cancel_install_workflow.py b/nuon/api/installs/cancel_install_workflow.py new file mode 100644 index 00000000..9b01f25d --- /dev/null +++ b/nuon/api/installs/cancel_install_workflow.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/install-workflows/{install_workflow_id}/cancel", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 202: + response_202 = cast(bool, response.json()) + return response_202 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """cancel an ongoing install workflow + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """cancel an ongoing install workflow + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + install_workflow_id=install_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """cancel an ongoing install workflow + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """cancel an ongoing install workflow + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + install_workflow_id=install_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/cancel_workflow.py b/nuon/api/installs/cancel_workflow.py new file mode 100644 index 00000000..a5c4ff92 --- /dev/null +++ b/nuon/api/installs/cancel_workflow.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/workflows/{workflow_id}/cancel", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 202: + response_202 = cast(bool, response.json()) + return response_202 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """cancel an ongoing workflow + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """cancel an ongoing workflow + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """cancel an ongoing workflow + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """cancel an ongoing workflow + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/create_install.py b/nuon/api/installs/create_install.py new file mode 100644 index 00000000..a3d8d66e --- /dev/null +++ b/nuon/api/installs/create_install.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install import AppInstall +from ...models.service_create_install_request import ServiceCreateInstallRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateInstallRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/installs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstall, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstall.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstall, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallRequest, +) -> Response[Union[AppInstall, StderrErrResponse]]: + """create an app install + + Args: + app_id (str): + body (ServiceCreateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstall, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallRequest, +) -> Optional[Union[AppInstall, StderrErrResponse]]: + """create an app install + + Args: + app_id (str): + body (ServiceCreateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstall, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallRequest, +) -> Response[Union[AppInstall, StderrErrResponse]]: + """create an app install + + Args: + app_id (str): + body (ServiceCreateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstall, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallRequest, +) -> Optional[Union[AppInstall, StderrErrResponse]]: + """create an app install + + Args: + app_id (str): + body (ServiceCreateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstall, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/create_install_component_deploy.py b/nuon/api/installs/create_install_component_deploy.py new file mode 100644 index 00000000..68af65a2 --- /dev/null +++ b/nuon/api/installs/create_install_component_deploy.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.service_create_install_component_deploy_request import ServiceCreateInstallComponentDeployRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, + *, + body: ServiceCreateInstallComponentDeployRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/components/{component_id}/deploys", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstallDeploy.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallComponentDeployRequest, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallComponentDeployRequest, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallComponentDeployRequest, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallComponentDeployRequest, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/create_install_config.py b/nuon/api/installs/create_install_config.py new file mode 100644 index 00000000..43358269 --- /dev/null +++ b/nuon/api/installs/create_install_config.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_config import AppInstallConfig +from ...models.service_create_install_config_request import ServiceCreateInstallConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceCreateInstallConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstallConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallConfigRequest, +) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + """create an install config + + Args: + install_id (str): + body (ServiceCreateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallConfigRequest, +) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + """create an install config + + Args: + install_id (str): + body (ServiceCreateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallConfig, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallConfigRequest, +) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + """create an install config + + Args: + install_id (str): + body (ServiceCreateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallConfigRequest, +) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + """create an install config + + Args: + install_id (str): + body (ServiceCreateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/create_install_deploy.py b/nuon/api/installs/create_install_deploy.py new file mode 100644 index 00000000..e595c1a0 --- /dev/null +++ b/nuon/api/installs/create_install_deploy.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.service_create_install_deploy_request import ServiceCreateInstallDeployRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceCreateInstallDeployRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/deploys", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstallDeploy.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallDeployRequest, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + body (ServiceCreateInstallDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallDeployRequest, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + body (ServiceCreateInstallDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallDeployRequest, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + body (ServiceCreateInstallDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallDeployRequest, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """deploy a build to an install + + Args: + install_id (str): + body (ServiceCreateInstallDeployRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/create_install_inputs.py b/nuon/api/installs/create_install_inputs.py new file mode 100644 index 00000000..112c32e8 --- /dev/null +++ b/nuon/api/installs/create_install_inputs.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_inputs import AppInstallInputs +from ...models.service_create_install_inputs_request import ServiceCreateInstallInputsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceCreateInstallInputsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/inputs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstallInputs.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallInputsRequest, +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + """create install inputs + + Args: + install_id (str): + body (ServiceCreateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallInputs, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallInputsRequest, +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + """create install inputs + + Args: + install_id (str): + body (ServiceCreateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallInputs, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallInputsRequest, +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + """create install inputs + + Args: + install_id (str): + body (ServiceCreateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallInputs, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallInputsRequest, +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + """create install inputs + + Args: + install_id (str): + body (ServiceCreateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallInputs, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/create_workflow_step_approval_response.py b/nuon/api/installs/create_workflow_step_approval_response.py new file mode 100644 index 00000000..732da53e --- /dev/null +++ b/nuon/api/installs/create_workflow_step_approval_response.py @@ -0,0 +1,231 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_create_workflow_step_approval_response_request import ( + ServiceCreateWorkflowStepApprovalResponseRequest, +) +from ...models.service_create_workflow_step_approval_response_response import ( + ServiceCreateWorkflowStepApprovalResponseResponse, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + body: ServiceCreateWorkflowStepApprovalResponseRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}/response", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + if response.status_code == 201: + response_201 = ServiceCreateWorkflowStepApprovalResponseResponse.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateWorkflowStepApprovalResponseRequest, +) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + body (ServiceCreateWorkflowStepApprovalResponseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateWorkflowStepApprovalResponseRequest, +) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + body (ServiceCreateWorkflowStepApprovalResponseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateWorkflowStepApprovalResponseRequest, +) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + body (ServiceCreateWorkflowStepApprovalResponseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateWorkflowStepApprovalResponseRequest, +) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + body (ServiceCreateWorkflowStepApprovalResponseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/delete_install.py b/nuon/api/installs/delete_install.py new file mode 100644 index 00000000..f740da9c --- /dev/null +++ b/nuon/api/installs/delete_install.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/installs/{install_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/deploy_install_components.py b/nuon/api/installs/deploy_install_components.py new file mode 100644 index 00000000..018fb2aa --- /dev/null +++ b/nuon/api/installs/deploy_install_components.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_deploy_install_components_request import ServiceDeployInstallComponentsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceDeployInstallComponentsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/components/deploy-all", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeployInstallComponentsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """deploy all components on an install + + Deploy all components to an install. + + This walks the graph order of the install's app, and will trigger a deploy for each on the specified + install. + + Args: + install_id (str): + body (ServiceDeployInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeployInstallComponentsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """deploy all components on an install + + Deploy all components to an install. + + This walks the graph order of the install's app, and will trigger a deploy for each on the specified + install. + + Args: + install_id (str): + body (ServiceDeployInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeployInstallComponentsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """deploy all components on an install + + Deploy all components to an install. + + This walks the graph order of the install's app, and will trigger a deploy for each on the specified + install. + + Args: + install_id (str): + body (ServiceDeployInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeployInstallComponentsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """deploy all components on an install + + Deploy all components to an install. + + This walks the graph order of the install's app, and will trigger a deploy for each on the specified + install. + + Args: + install_id (str): + body (ServiceDeployInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/deprovision_install.py b/nuon/api/installs/deprovision_install.py new file mode 100644 index 00000000..b72ee735 --- /dev/null +++ b/nuon/api/installs/deprovision_install.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_deprovision_install_request import ServiceDeprovisionInstallRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceDeprovisionInstallRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/deprovision", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallRequest, +) -> Response[Union[StderrErrResponse, str]]: + """deprovision an install + + Deprovision an install sandbox. + + Args: + install_id (str): + body (ServiceDeprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """deprovision an install + + Deprovision an install sandbox. + + Args: + install_id (str): + body (ServiceDeprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallRequest, +) -> Response[Union[StderrErrResponse, str]]: + """deprovision an install + + Deprovision an install sandbox. + + Args: + install_id (str): + body (ServiceDeprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """deprovision an install + + Deprovision an install sandbox. + + Args: + install_id (str): + body (ServiceDeprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/deprovision_install_sandbox.py b/nuon/api/installs/deprovision_install_sandbox.py new file mode 100644 index 00000000..7c452297 --- /dev/null +++ b/nuon/api/installs/deprovision_install_sandbox.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_deprovision_install_sandbox_request import ServiceDeprovisionInstallSandboxRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceDeprovisionInstallSandboxRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/deprovision-sandbox", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallSandboxRequest, +) -> Response[Union[StderrErrResponse, str]]: + """deprovision an install + + Args: + install_id (str): + body (ServiceDeprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallSandboxRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """deprovision an install + + Args: + install_id (str): + body (ServiceDeprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallSandboxRequest, +) -> Response[Union[StderrErrResponse, str]]: + """deprovision an install + + Args: + install_id (str): + body (ServiceDeprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceDeprovisionInstallSandboxRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """deprovision an install + + Args: + install_id (str): + body (ServiceDeprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/forget_install.py b/nuon/api/installs/forget_install.py new file mode 100644 index 00000000..ef7ec65f --- /dev/null +++ b/nuon/api/installs/forget_install.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_forget_install_request import ServiceForgetInstallRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceForgetInstallRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/forget", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceForgetInstallRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """forget an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + body (ServiceForgetInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceForgetInstallRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """forget an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + body (ServiceForgetInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceForgetInstallRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """forget an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + body (ServiceForgetInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceForgetInstallRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """forget an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + body (ServiceForgetInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/generate_cli_install_config.py b/nuon/api/installs/generate_cli_install_config.py new file mode 100644 index 00000000..356d3b00 --- /dev/null +++ b/nuon/api/installs/generate_cli_install_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from io import BytesIO +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import File, Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/generate-cli-install-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[File, StderrErrResponse]]: + if response.status_code == 200: + response_200 = File(payload=BytesIO(response.content)) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.content) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.content) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.content) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.content) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.content) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[File, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[File, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[File, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[File, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[File, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_app_installs.py b/nuon/api/installs/get_app_installs.py new file mode 100644 index 00000000..12061b3b --- /dev/null +++ b/nuon/api/installs/get_app_installs.py @@ -0,0 +1,242 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install import AppInstall +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["q"] = q + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/installs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstall.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstall']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + q=q, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstall']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + q=q, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstall']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + q=q, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an app + + Args: + app_id (str): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstall']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + q=q, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_current_install_inputs.py b/nuon/api/installs/get_current_install_inputs.py new file mode 100644 index 00000000..50c178de --- /dev/null +++ b/nuon/api/installs/get_current_install_inputs.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_inputs import AppInstallInputs +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/inputs/current", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallInputs.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + """get an installs current inputs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallInputs, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + """get an installs current inputs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallInputs, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + """get an installs current inputs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallInputs, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + """get an installs current inputs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallInputs, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_drifted_objects.py b/nuon/api/installs/get_drifted_objects.py new file mode 100644 index 00000000..90ff5242 --- /dev/null +++ b/nuon/api/installs/get_drifted_objects.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_drifted_object import AppDriftedObject +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/drifted-objects", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppDriftedObject.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppDriftedObject']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppDriftedObject']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppDriftedObject']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppDriftedObject']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install.py b/nuon/api/installs/get_install.py new file mode 100644 index 00000000..d66ee92c --- /dev/null +++ b/nuon/api/installs/get_install.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install import AppInstall +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + include_drifted_objects: Union[Unset, bool] = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["include_drifted_objects"] = include_drifted_objects + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstall, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstall.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstall, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, +) -> Response[Union[AppInstall, StderrErrResponse]]: + """get an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstall, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + include_drifted_objects=include_drifted_objects, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, +) -> Optional[Union[AppInstall, StderrErrResponse]]: + """get an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstall, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + include_drifted_objects=include_drifted_objects, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, +) -> Response[Union[AppInstall, StderrErrResponse]]: + """get an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstall, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + include_drifted_objects=include_drifted_objects, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, +) -> Optional[Union[AppInstall, StderrErrResponse]]: + """get an install + + Forget an install that has been deleted outside of nuon. + + This should only be used in cases where an install was broken in an unordinary way and needs to be + manually deleted so the parent resources can be deleted. + + Args: + install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstall, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + include_drifted_objects=include_drifted_objects, + ) + ).parsed diff --git a/nuon/api/installs/get_install_action.py b/nuon/api/installs/get_install_action.py new file mode 100644 index 00000000..6113b2f4 --- /dev/null +++ b/nuon/api/installs/get_install_action.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/{action_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_action_workflow.py b/nuon/api/installs/get_install_action_workflow.py new file mode 100644 index 00000000..ae21ad96 --- /dev/null +++ b/nuon/api/installs/get_install_action_workflow.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + action_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows/{action_workflow_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action workflow + + Get an install action workflow. + + Args: + install_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_workflow_id=action_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action workflow + + Get an install action workflow. + + Args: + install_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + action_workflow_id=action_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action workflow + + Get an install action workflow. + + Args: + install_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_workflow_id=action_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + action_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action workflow + + Get an install action workflow. + + Args: + install_id (str): + action_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + action_workflow_id=action_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_action_workflows.py b/nuon/api/installs/get_install_action_workflows.py new file mode 100644 index 00000000..dc61bab3 --- /dev/null +++ b/nuon/api/installs/get_install_action_workflows.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/action-workflows", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_actions.py b/nuon/api/installs/get_install_actions.py new file mode 100644 index 00000000..5c1be6da --- /dev/null +++ b/nuon/api/installs/get_install_actions.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_audit_logs.py b/nuon/api/installs/get_install_audit_logs.py new file mode 100644 index 00000000..bbed757e --- /dev/null +++ b/nuon/api/installs/get_install_audit_logs.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_audit_log import AppInstallAuditLog +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response + + +def _get_kwargs( + install_id: str, + *, + start: str, + end: str, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["start"] = start + + params["end"] = end + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/audit_logs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.text + for response_200_item_data in _response_200: + response_200_item = AppInstallAuditLog.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.text) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.text) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.text) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.text) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.text) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + start: str, + end: str, +) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + """get install audit logs + + Args: + install_id (str): + start (str): + end (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallAuditLog']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + start=start, + end=end, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + start: str, + end: str, +) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + """get install audit logs + + Args: + install_id (str): + start (str): + end (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallAuditLog']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + start=start, + end=end, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + start: str, + end: str, +) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + """get install audit logs + + Args: + install_id (str): + start (str): + end (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallAuditLog']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + start=start, + end=end, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + start: str, + end: str, +) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + """get install audit logs + + Args: + install_id (str): + start (str): + end (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallAuditLog']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + start=start, + end=end, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component.py b/nuon/api/installs/get_install_component.py new file mode 100644 index 00000000..8790eaee --- /dev/null +++ b/nuon/api/installs/get_install_component.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_component import AppInstallComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/{component_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallComponent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallComponent, StderrErrResponse]]: + """get an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: + """get an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallComponent, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallComponent, StderrErrResponse]]: + """get an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: + """get an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component_deploy.py b/nuon/api/installs/get_install_component_deploy.py new file mode 100644 index 00000000..d2465153 --- /dev/null +++ b/nuon/api/installs/get_install_component_deploy.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, + deploy_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/{component_id}/deploys/{deploy_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallDeploy.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component_deploys.py b/nuon/api/installs/get_install_component_deploys.py new file mode 100644 index 00000000..1646368d --- /dev/null +++ b/nuon/api/installs/get_install_component_deploys.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/{component_id}/deploys", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallDeploy.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get an install components deploys + + Args: + install_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get an install components deploys + + Args: + install_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get an install components deploys + + Args: + install_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get an install components deploys + + Args: + install_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component_latest_deploy.py b/nuon/api/installs/get_install_component_latest_deploy.py new file mode 100644 index 00000000..7282d2e7 --- /dev/null +++ b/nuon/api/installs/get_install_component_latest_deploy.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/{component_id}/deploys/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallDeploy.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get the latest deploy for an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get the latest deploy for an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get the latest deploy for an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get the latest deploy for an install component + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component_outputs.py b/nuon/api/installs/get_install_component_outputs.py new file mode 100644 index 00000000..44d5b26b --- /dev/null +++ b/nuon/api/installs/get_install_component_outputs.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_install_component_outputs_response_200 import GetInstallComponentOutputsResponse200 +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/{component_id}/outputs", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetInstallComponentOutputsResponse200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + """get an install component outputs + + Return the latest outputs for a component. + + **NOTE** requires a valid install. + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + """get an install component outputs + + Return the latest outputs for a component. + + **NOTE** requires a valid install. + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetInstallComponentOutputsResponse200, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + """get an install component outputs + + Return the latest outputs for a component. + + **NOTE** requires a valid install. + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + """get an install component outputs + + Return the latest outputs for a component. + + **NOTE** requires a valid install. + + Args: + install_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetInstallComponentOutputsResponse200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_components.py b/nuon/api/installs/get_install_components.py new file mode 100644 index 00000000..1c99fc90 --- /dev/null +++ b/nuon/api/installs/get_install_components.py @@ -0,0 +1,242 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_component import AppInstallComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["types"] = types + + params["q"] = q + + params["offset"] = offset + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallComponent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, +) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: + """get an installs components + + Args: + install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallComponent']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + types=types, + q=q, + offset=offset, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, +) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: + """get an installs components + + Args: + install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallComponent']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + types=types, + q=q, + offset=offset, + limit=limit, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, +) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: + """get an installs components + + Args: + install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallComponent']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + types=types, + q=q, + offset=offset, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, +) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: + """get an installs components + + Args: + install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallComponent']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + types=types, + q=q, + offset=offset, + limit=limit, + ) + ).parsed diff --git a/nuon/api/installs/get_install_components_deploys.py b/nuon/api/installs/get_install_components_deploys.py new file mode 100644 index 00000000..00356438 --- /dev/null +++ b/nuon/api/installs/get_install_components_deploys.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/deploys", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallDeploy.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_components_summary.py b/nuon/api/installs/get_install_components_summary.py new file mode 100644 index 00000000..dd101822 --- /dev/null +++ b/nuon/api/installs/get_install_components_summary.py @@ -0,0 +1,257 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_component_summary import AppInstallComponentSummary +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["types"] = types + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params["q"] = q + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/summary", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallComponentSummary.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + """get an installs components summary + + Args: + install_id (str): + types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallComponentSummary']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + types=types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + """get an installs components summary + + Args: + install_id (str): + types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallComponentSummary']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + types=types, + offset=offset, + limit=limit, + page=page, + q=q, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + """get an installs components summary + + Args: + install_id (str): + types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallComponentSummary']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + types=types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + """get an installs components summary + + Args: + install_id (str): + types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallComponentSummary']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + types=types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + ).parsed diff --git a/nuon/api/installs/get_install_deploy.py b/nuon/api/installs/get_install_deploy.py new file mode 100644 index 00000000..b086ff60 --- /dev/null +++ b/nuon/api/installs/get_install_deploy.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + deploy_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/deploys/{deploy_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallDeploy.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + deploy_id=deploy_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + deploy_id=deploy_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + deploy_id=deploy_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + deploy_id=deploy_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_deploys.py b/nuon/api/installs/get_install_deploys.py new file mode 100644 index 00000000..19c01b2c --- /dev/null +++ b/nuon/api/installs/get_install_deploys.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/deploys", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallDeploy.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_event.py b/nuon/api/installs/get_install_event.py new file mode 100644 index 00000000..efc795f4 --- /dev/null +++ b/nuon/api/installs/get_install_event.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_event import AppInstallEvent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + event_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/events/{event_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallEvent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallEvent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + event_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallEvent, StderrErrResponse]]: + """get an install event + + Get a single install event. + + Args: + install_id (str): + event_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallEvent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + event_id=event_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + event_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: + """get an install event + + Get a single install event. + + Args: + install_id (str): + event_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallEvent, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + event_id=event_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + event_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallEvent, StderrErrResponse]]: + """get an install event + + Get a single install event. + + Args: + install_id (str): + event_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallEvent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + event_id=event_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + event_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: + """get an install event + + Get a single install event. + + Args: + install_id (str): + event_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallEvent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + event_id=event_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_events.py b/nuon/api/installs/get_install_events.py new file mode 100644 index 00000000..d9813009 --- /dev/null +++ b/nuon/api/installs/get_install_events.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_event import AppInstallEvent +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/events", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallEvent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: + """get events for an install + + # Get Install Events + + Return an event stream for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallEvent']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: + """get events for an install + + # Get Install Events + + Return an event stream for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallEvent']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: + """get events for an install + + # Get Install Events + + Return an event stream for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallEvent']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: + """get events for an install + + # Get Install Events + + Return an event stream for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallEvent']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_inputs.py b/nuon/api/installs/get_install_inputs.py new file mode 100644 index 00000000..76d652fb --- /dev/null +++ b/nuon/api/installs/get_install_inputs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_inputs import AppInstallInputs +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/inputs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallInputs.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: + """get an installs inputs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallInputs']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: + """get an installs inputs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallInputs']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: + """get an installs inputs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallInputs']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: + """get an installs inputs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallInputs']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_latest_deploy.py b/nuon/api/installs/get_install_latest_deploy.py new file mode 100644 index 00000000..40c74881 --- /dev/null +++ b/nuon/api/installs/get_install_latest_deploy.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/deploys/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallDeploy.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install's latest deploy + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install's latest deploy + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install's latest deploy + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install's latest deploy + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_readme.py b/nuon/api/installs/get_install_readme.py new file mode 100644 index 00000000..60737b67 --- /dev/null +++ b/nuon/api/installs/get_install_readme.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_readme import ServiceReadme +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/readme", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceReadme, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceReadme.from_dict(response.json()) + + return response_200 + if response.status_code == 206: + response_206 = ServiceReadme.from_dict(response.json()) + + return response_206 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceReadme, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceReadme, StderrErrResponse]]: + """get install readme rendered with + + Returns the `app.readme` markdown with the values interpolated from the install + inputs and component outputs. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceReadme, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceReadme, StderrErrResponse]]: + """get install readme rendered with + + Returns the `app.readme` markdown with the values interpolated from the install + inputs and component outputs. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceReadme, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceReadme, StderrErrResponse]]: + """get install readme rendered with + + Returns the `app.readme` markdown with the values interpolated from the install + inputs and component outputs. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceReadme, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceReadme, StderrErrResponse]]: + """get install readme rendered with + + Returns the `app.readme` markdown with the values interpolated from the install + inputs and component outputs. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceReadme, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_runner_group.py b/nuon/api/installs/get_install_runner_group.py new file mode 100644 index 00000000..f34cfd2e --- /dev/null +++ b/nuon/api/installs/get_install_runner_group.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_group import AppRunnerGroup +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/runner-group", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerGroup.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an install's runner group + + Return the runner group, including runners and settings for the provided install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerGroup, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an install's runner group + + Return the runner group, including runners and settings for the provided install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerGroup, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an install's runner group + + Return the runner group, including runners and settings for the provided install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerGroup, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an install's runner group + + Return the runner group, including runners and settings for the provided install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerGroup, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_sandbox_run.py b/nuon/api/installs/get_install_sandbox_run.py new file mode 100644 index 00000000..d81eac16 --- /dev/null +++ b/nuon/api/installs/get_install_sandbox_run.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_sandbox_run import AppInstallSandboxRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + run_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/sandbox-runs/{run_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallSandboxRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallSandboxRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + run_id=run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallSandboxRun, StderrErrResponse] + """ + + return sync_detailed( + run_id=run_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallSandboxRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + run_id=run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallSandboxRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + run_id=run_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_sandbox_run_v2.py b/nuon/api/installs/get_install_sandbox_run_v2.py new file mode 100644 index 00000000..a0b8ac3c --- /dev/null +++ b/nuon/api/installs/get_install_sandbox_run_v2.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_sandbox_run import AppInstallSandboxRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/sandbox-runs/{run_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallSandboxRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallSandboxRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallSandboxRun, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallSandboxRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallSandboxRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_sandbox_runs.py b/nuon/api/installs/get_install_sandbox_runs.py new file mode 100644 index 00000000..05680687 --- /dev/null +++ b/nuon/api/installs/get_install_sandbox_runs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_sandbox_run import AppInstallSandboxRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/sandbox-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallSandboxRun.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + """get an installs sandbox runs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallSandboxRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + """get an installs sandbox runs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallSandboxRun']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + """get an installs sandbox runs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallSandboxRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + """get an installs sandbox runs + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallSandboxRun']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_stack.py b/nuon/api/installs/get_install_stack.py new file mode 100644 index 00000000..e4218cf7 --- /dev/null +++ b/nuon/api/installs/get_install_stack.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_stack import AppInstallStack +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + stack_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/stacks/{stack_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallStack.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallStack, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + stack_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by stack ID + + Args: + stack_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallStack, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + stack_id=stack_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + stack_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by stack ID + + Args: + stack_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallStack, StderrErrResponse] + """ + + return sync_detailed( + stack_id=stack_id, + client=client, + ).parsed + + +async def asyncio_detailed( + stack_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by stack ID + + Args: + stack_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallStack, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + stack_id=stack_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + stack_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by stack ID + + Args: + stack_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallStack, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + stack_id=stack_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_stack_by_install_id.py b/nuon/api/installs/get_install_stack_by_install_id.py new file mode 100644 index 00000000..519195aa --- /dev/null +++ b/nuon/api/installs/get_install_stack_by_install_id.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_stack import AppInstallStack +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/stack", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallStack.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallStack, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by install ID + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallStack, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by install ID + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallStack, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by install ID + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallStack, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + """get an install stack by install ID + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallStack, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_stack_runs.py b/nuon/api/installs/get_install_stack_runs.py new file mode 100644 index 00000000..a7bfad6a --- /dev/null +++ b/nuon/api/installs/get_install_stack_runs.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_stack_version_run import AppInstallStackVersionRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/stack-runs", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallStackVersionRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: + """get an install's stack runs + + get install stack runs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallStackVersionRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: + """get an install's stack runs + + get install stack runs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallStackVersionRun, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: + """get an install's stack runs + + get install stack runs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallStackVersionRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: + """get an install's stack runs + + get install stack runs + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallStackVersionRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_state.py b/nuon/api/installs/get_install_state.py new file mode 100644 index 00000000..73e08c5c --- /dev/null +++ b/nuon/api/installs/get_install_state.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.github_com_powertoolsdev_mono_pkg_types_state_state import GithubComPowertoolsdevMonoPkgTypesStateState +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/state", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + """Get the current state of an install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + """Get the current state of an install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + """Get the current state of an install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + """Get the current state of an install. + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_state_history.py b/nuon/api/installs/get_install_state_history.py new file mode 100644 index 00000000..a9bfc30a --- /dev/null +++ b/nuon/api/installs/get_install_state_history.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_state import AppInstallState +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/state-history", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallState.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallState']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallState']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallState']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallState']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_workflow.py b/nuon/api/installs/get_install_workflow.py new file mode 100644 index 00000000..7add3a78 --- /dev/null +++ b/nuon/api/installs/get_install_workflow.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow import AppWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/install-workflows/{install_workflow_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """get an install workflow + + Return a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """get an install workflow + + Return a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_workflow_id=install_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """get an install workflow + + Return a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """get an install workflow + + Return a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_workflow_id=install_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_workflow_step.py b/nuon/api/installs/get_install_workflow_step.py new file mode 100644 index 00000000..7ceb6b78 --- /dev/null +++ b/nuon/api/installs/get_install_workflow_step.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow_step import AppWorkflowStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_workflow_id: str, + install_workflow_step_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/install-workflows/{install_workflow_id}/steps/{install_workflow_step_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflowStep.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_workflow_id: str, + install_workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + """get an install workflow step + + Return a single workflow step. + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_workflow_id: str, + install_workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + """get an install workflow step + + Return a single workflow step. + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStep, StderrErrResponse] + """ + + return sync_detailed( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_workflow_id: str, + install_workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + """get an install workflow step + + Return a single workflow step. + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_workflow_id: str, + install_workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + """get an install workflow step + + Return a single workflow step. + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStep, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_workflow_step_approval.py b/nuon/api/installs/get_install_workflow_step_approval.py new file mode 100644 index 00000000..dfd267d6 --- /dev/null +++ b/nuon/api/installs/get_install_workflow_step_approval.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow_step_approval import AppWorkflowStepApproval +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_workflow_id: str, + install_workflow_step_id: str, + approval_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/install-workflows/{install_workflow_id}/steps/{install_workflow_step_id}/approvals/{approval_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflowStepApproval.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_workflow_id: str, + install_workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an install workflow step approval + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + approval_id=approval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_workflow_id: str, + install_workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an install workflow step approval + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStepApproval, StderrErrResponse] + """ + + return sync_detailed( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + approval_id=approval_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_workflow_id: str, + install_workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an install workflow step approval + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + approval_id=approval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_workflow_id: str, + install_workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an install workflow step approval + + Args: + install_workflow_id (str): + install_workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStepApproval, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_workflow_id=install_workflow_id, + install_workflow_step_id=install_workflow_step_id, + approval_id=approval_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_workflow_steps.py b/nuon/api/installs/get_install_workflow_steps.py new file mode 100644 index 00000000..7cdd4868 --- /dev/null +++ b/nuon/api/installs/get_install_workflow_steps.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow_step import AppWorkflowStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/install-workflows/{install_workflow_id}/steps", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppWorkflowStep.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given install workflow + + Return all steps for a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given install workflow + + Return all steps for a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppWorkflowStep']] + """ + + return sync_detailed( + install_workflow_id=install_workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given install workflow + + Return all steps for a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given install workflow + + Return all steps for a workflow. + + Args: + install_workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppWorkflowStep']] + """ + + return ( + await asyncio_detailed( + install_workflow_id=install_workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_org_installs.py b/nuon/api/installs/get_org_installs.py new file mode 100644 index 00000000..254ab42a --- /dev/null +++ b/nuon/api/installs/get_org_installs.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install import AppInstall +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["q"] = q + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/installs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstall.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstall']]] + """ + + kwargs = _get_kwargs( + offset=offset, + q=q, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstall']] + """ + + return sync_detailed( + client=client, + offset=offset, + q=q, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstall']]] + """ + + kwargs = _get_kwargs( + offset=offset, + q=q, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + """get all installs for an org + + Args: + offset (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstall']] + """ + + return ( + await asyncio_detailed( + client=client, + offset=offset, + q=q, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_workflow.py b/nuon/api/installs/get_workflow.py new file mode 100644 index 00000000..8b645bf3 --- /dev/null +++ b/nuon/api/installs/get_workflow.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow import AppWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/workflows/{workflow_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """get a workflow + + Return a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """get a workflow + + Return a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """get a workflow + + Return a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """get a workflow + + Return a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_workflow_step.py b/nuon/api/installs/get_workflow_step.py new file mode 100644 index 00000000..176943fb --- /dev/null +++ b/nuon/api/installs/get_workflow_step.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow_step import AppWorkflowStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + workflow_step_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflowStep.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + """get a workflow step + + Return a single workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + """get a workflow step + + Return a single workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStep, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + """get a workflow step + + Return a single workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + workflow_step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + """get a workflow step + + Return a single workflow step. + + Args: + workflow_id (str): + workflow_step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStep, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_workflow_step_approval.py b/nuon/api/installs/get_workflow_step_approval.py new file mode 100644 index 00000000..f616442f --- /dev/null +++ b/nuon/api/installs/get_workflow_step_approval.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow_step_approval import AppWorkflowStepApproval +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + workflow_step_id: str, + approval_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflowStepApproval.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an workflow step approval + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an workflow step approval + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStepApproval, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an workflow step approval + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + """get an workflow step approval + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflowStepApproval, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_workflow_step_approval_contents.py b/nuon/api/installs/get_workflow_step_approval_contents.py new file mode 100644 index 00000000..75ffeb3b --- /dev/null +++ b/nuon/api/installs/get_workflow_step_approval_contents.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_workflow_step_approval_contents_response_200 import GetWorkflowStepApprovalContentsResponse200 +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + workflow_step_id: str, + approval_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}/contents", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetWorkflowStepApprovalContentsResponse200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + """get a workflow step approval contents + + Return the contents of a json plan for an approval (compressed). + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + """get a workflow step approval contents + + Return the contents of a json plan for an approval (compressed). + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + """get a workflow step approval contents + + Return the contents of a json plan for an approval (compressed). + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + workflow_step_id: str, + approval_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + """get a workflow step approval contents + + Return the contents of a json plan for an approval (compressed). + + Args: + workflow_id (str): + workflow_step_id (str): + approval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + workflow_step_id=workflow_step_id, + approval_id=approval_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_workflow_steps.py b/nuon/api/installs/get_workflow_steps.py new file mode 100644 index 00000000..c1f3f49c --- /dev/null +++ b/nuon/api/installs/get_workflow_steps.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow_step import AppWorkflowStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/workflows/{workflow_id}/steps", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppWorkflowStep.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given workflow + + Return all steps for a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given workflow + + Return all steps for a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppWorkflowStep']] + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given workflow + + Return all steps for a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + """get all of the steps for a given workflow + + Return all steps for a workflow. + + Args: + workflow_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppWorkflowStep']] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_workflows.py b/nuon/api/installs/get_workflows.py new file mode 100644 index 00000000..f4622fe1 --- /dev/null +++ b/nuon/api/installs/get_workflows.py @@ -0,0 +1,295 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow import AppWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params["planonly"] = planonly + + params["type"] = type_ + + params["created_at_gte"] = created_at_gte + + params["created_at_lte"] = created_at_lte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/workflows", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: + """get workflows + + Return workflows for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: + """get workflows + + Return workflows for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: + """get workflows + + Return workflows for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: + """get workflows + + Return workflows for an install. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, + ) + ).parsed diff --git a/nuon/api/installs/phone_home.py b/nuon/api/installs/phone_home.py new file mode 100644 index 00000000..205c89fb --- /dev/null +++ b/nuon/api/installs/phone_home.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_install_phone_home_request import ServiceInstallPhoneHomeRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + phone_home_id: str, + *, + body: ServiceInstallPhoneHomeRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/phone-home/{phone_home_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + phone_home_id: str, + *, + client: AuthenticatedClient, + body: ServiceInstallPhoneHomeRequest, +) -> Response[Union[StderrErrResponse, str]]: + """phone home for an install + + A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully + processing it. + + Args: + install_id (str): + phone_home_id (str): + body (ServiceInstallPhoneHomeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + phone_home_id=phone_home_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + phone_home_id: str, + *, + client: AuthenticatedClient, + body: ServiceInstallPhoneHomeRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """phone home for an install + + A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully + processing it. + + Args: + install_id (str): + phone_home_id (str): + body (ServiceInstallPhoneHomeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + phone_home_id=phone_home_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + phone_home_id: str, + *, + client: AuthenticatedClient, + body: ServiceInstallPhoneHomeRequest, +) -> Response[Union[StderrErrResponse, str]]: + """phone home for an install + + A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully + processing it. + + Args: + install_id (str): + phone_home_id (str): + body (ServiceInstallPhoneHomeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + phone_home_id=phone_home_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + phone_home_id: str, + *, + client: AuthenticatedClient, + body: ServiceInstallPhoneHomeRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """phone home for an install + + A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully + processing it. + + Args: + install_id (str): + phone_home_id (str): + body (ServiceInstallPhoneHomeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + phone_home_id=phone_home_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/reprovision_install.py b/nuon/api/installs/reprovision_install.py new file mode 100644 index 00000000..2aee9b9f --- /dev/null +++ b/nuon/api/installs/reprovision_install.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_reprovision_install_request import ServiceReprovisionInstallRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceReprovisionInstallRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/reprovision", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallRequest, +) -> Response[Union[StderrErrResponse, str]]: + """reprovision an install + + Reprovision an install sandbox. + + + Args: + install_id (str): + body (ServiceReprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """reprovision an install + + Reprovision an install sandbox. + + + Args: + install_id (str): + body (ServiceReprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallRequest, +) -> Response[Union[StderrErrResponse, str]]: + """reprovision an install + + Reprovision an install sandbox. + + + Args: + install_id (str): + body (ServiceReprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """reprovision an install + + Reprovision an install sandbox. + + + Args: + install_id (str): + body (ServiceReprovisionInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/reprovision_install_sandbox.py b/nuon/api/installs/reprovision_install_sandbox.py new file mode 100644 index 00000000..ccc4f94b --- /dev/null +++ b/nuon/api/installs/reprovision_install_sandbox.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_reprovision_install_sandbox_request import ServiceReprovisionInstallSandboxRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceReprovisionInstallSandboxRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/reprovision-sandbox", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallSandboxRequest, +) -> Response[Union[StderrErrResponse, str]]: + """reprovision an install sandbox + + Reprovision an install sandbox and redeploy all components on top. + + Args: + install_id (str): + body (ServiceReprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallSandboxRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """reprovision an install sandbox + + Reprovision an install sandbox and redeploy all components on top. + + Args: + install_id (str): + body (ServiceReprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallSandboxRequest, +) -> Response[Union[StderrErrResponse, str]]: + """reprovision an install sandbox + + Reprovision an install sandbox and redeploy all components on top. + + Args: + install_id (str): + body (ServiceReprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceReprovisionInstallSandboxRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """reprovision an install sandbox + + Reprovision an install sandbox and redeploy all components on top. + + Args: + install_id (str): + body (ServiceReprovisionInstallSandboxRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/retry_owner_workflow_by_id.py b/nuon/api/installs/retry_owner_workflow_by_id.py new file mode 100644 index 00000000..4214cd1f --- /dev/null +++ b/nuon/api/installs/retry_owner_workflow_by_id.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_retry_workflow_by_id_request import ServiceRetryWorkflowByIDRequest +from ...models.service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + *, + body: ServiceRetryWorkflowByIDRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/workflows/{workflow_id}/retry", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + if response.status_code == 201: + response_201 = ServiceRetryWorkflowByIDResponse.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowByIDRequest, +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + body (ServiceRetryWorkflowByIDRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowByIDRequest, +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + body (ServiceRetryWorkflowByIDRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowByIDRequest, +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + body (ServiceRetryWorkflowByIDRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowByIDRequest, +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + body (ServiceRetryWorkflowByIDRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/retry_workflow.py b/nuon/api/installs/retry_workflow.py new file mode 100644 index 00000000..a116384e --- /dev/null +++ b/nuon/api/installs/retry_workflow.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_retry_workflow_request import ServiceRetryWorkflowRequest +from ...models.service_retry_workflow_response import ServiceRetryWorkflowResponse +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceRetryWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/retry-workflow", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + if response.status_code == 201: + response_201 = ServiceRetryWorkflowResponse.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowRequest, +) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + install_id (str): + body (ServiceRetryWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowRequest, +) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + install_id (str): + body (ServiceRetryWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowResponse, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowRequest, +) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + install_id (str): + body (ServiceRetryWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowRequest, +) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + install_id (str): + body (ServiceRetryWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowResponse, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/retry_workflow_step.py b/nuon/api/installs/retry_workflow_step.py new file mode 100644 index 00000000..e80c977d --- /dev/null +++ b/nuon/api/installs/retry_workflow_step.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse +from ...models.service_retry_workflow_step_response import ServiceRetryWorkflowStepResponse +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + step_id: str, + *, + body: ServiceRetryWorkflowStepResponse, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/workflows/{workflow_id}/step/{step_id}/retry", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + if response.status_code == 201: + response_201 = ServiceRetryWorkflowByIDResponse.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + step_id=step_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + step_id=step_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + step_id=step_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + step_id=step_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/sync_secrets.py b/nuon/api/installs/sync_secrets.py new file mode 100644 index 00000000..6eccb51c --- /dev/null +++ b/nuon/api/installs/sync_secrets.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_sync_secrets_request import ServiceSyncSecretsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceSyncSecretsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/sync-secrets", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceSyncSecretsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """sync secrets install + + Execute the sync secrets workflow. + + Args: + install_id (str): + body (ServiceSyncSecretsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceSyncSecretsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """sync secrets install + + Execute the sync secrets workflow. + + Args: + install_id (str): + body (ServiceSyncSecretsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceSyncSecretsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """sync secrets install + + Execute the sync secrets workflow. + + Args: + install_id (str): + body (ServiceSyncSecretsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceSyncSecretsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """sync secrets install + + Execute the sync secrets workflow. + + Args: + install_id (str): + body (ServiceSyncSecretsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/teardown_install_component.py b/nuon/api/installs/teardown_install_component.py new file mode 100644 index 00000000..a80fe254 --- /dev/null +++ b/nuon/api/installs/teardown_install_component.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_teardown_install_component_request import ServiceTeardownInstallComponentRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, + *, + body: ServiceTeardownInstallComponentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/components/{component_id}/teardown", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentRequest, +) -> Response[Union[StderrErrResponse, str]]: + """teardown an install component + + Args: + install_id (str): + component_id (str): + body (ServiceTeardownInstallComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """teardown an install component + + Args: + install_id (str): + component_id (str): + body (ServiceTeardownInstallComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentRequest, +) -> Response[Union[StderrErrResponse, str]]: + """teardown an install component + + Args: + install_id (str): + component_id (str): + body (ServiceTeardownInstallComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """teardown an install component + + Args: + install_id (str): + component_id (str): + body (ServiceTeardownInstallComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/teardown_install_components.py b/nuon/api/installs/teardown_install_components.py new file mode 100644 index 00000000..37d607fa --- /dev/null +++ b/nuon/api/installs/teardown_install_components.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_teardown_install_components_request import ServiceTeardownInstallComponentsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceTeardownInstallComponentsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/components/teardown-all", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """teardown an install's components + + Teardown all components on an install. + + Args: + install_id (str): + body (ServiceTeardownInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """teardown an install's components + + Teardown all components on an install. + + Args: + install_id (str): + body (ServiceTeardownInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentsRequest, +) -> Response[Union[StderrErrResponse, str]]: + """teardown an install's components + + Teardown all components on an install. + + Args: + install_id (str): + body (ServiceTeardownInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceTeardownInstallComponentsRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """teardown an install's components + + Teardown all components on an install. + + Args: + install_id (str): + body (ServiceTeardownInstallComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/update_install.py b/nuon/api/installs/update_install.py new file mode 100644 index 00000000..d5b78e80 --- /dev/null +++ b/nuon/api/installs/update_install.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install import AppInstall +from ...models.service_update_install_request import ServiceUpdateInstallRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceUpdateInstallRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/installs/{install_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstall, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstall.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstall, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallRequest, +) -> Response[Union[AppInstall, StderrErrResponse]]: + """update an install + + Args: + install_id (str): + body (ServiceUpdateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstall, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallRequest, +) -> Optional[Union[AppInstall, StderrErrResponse]]: + """update an install + + Args: + install_id (str): + body (ServiceUpdateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstall, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallRequest, +) -> Response[Union[AppInstall, StderrErrResponse]]: + """update an install + + Args: + install_id (str): + body (ServiceUpdateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstall, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallRequest, +) -> Optional[Union[AppInstall, StderrErrResponse]]: + """update an install + + Args: + install_id (str): + body (ServiceUpdateInstallRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstall, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/update_install_config.py b/nuon/api/installs/update_install_config.py new file mode 100644 index 00000000..3e126ef2 --- /dev/null +++ b/nuon/api/installs/update_install_config.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_config import AppInstallConfig +from ...models.service_update_install_config_request import ServiceUpdateInstallConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + config_id: str, + *, + body: ServiceUpdateInstallConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/installs/{install_id}/configs/{config_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppInstallConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallConfigRequest, +) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + """update an install config + + Args: + install_id (str): + config_id (str): + body (ServiceUpdateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + config_id=config_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallConfigRequest, +) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + """update an install config + + Args: + install_id (str): + config_id (str): + body (ServiceUpdateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallConfig, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + config_id=config_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallConfigRequest, +) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + """update an install config + + Args: + install_id (str): + config_id (str): + body (ServiceUpdateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + config_id=config_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + config_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallConfigRequest, +) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + """update an install config + + Args: + install_id (str): + config_id (str): + body (ServiceUpdateInstallConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + config_id=config_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/update_install_inputs.py b/nuon/api/installs/update_install_inputs.py new file mode 100644 index 00000000..0f84c650 --- /dev/null +++ b/nuon/api/installs/update_install_inputs.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_inputs import AppInstallInputs +from ...models.service_update_install_inputs_request import ServiceUpdateInstallInputsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceUpdateInstallInputsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/installs/{install_id}/inputs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallInputs.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallInputsRequest, +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + """Updates install input config for app + + Args: + install_id (str): + body (ServiceUpdateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallInputs, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallInputsRequest, +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + """Updates install input config for app + + Args: + install_id (str): + body (ServiceUpdateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallInputs, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallInputsRequest, +) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + """Updates install input config for app + + Args: + install_id (str): + body (ServiceUpdateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallInputs, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateInstallInputsRequest, +) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + """Updates install input config for app + + Args: + install_id (str): + body (ServiceUpdateInstallInputsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallInputs, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/update_install_workflow.py b/nuon/api/installs/update_install_workflow.py new file mode 100644 index 00000000..52e2d3a2 --- /dev/null +++ b/nuon/api/installs/update_install_workflow.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow import AppWorkflow +from ...models.service_update_workflow_request import ServiceUpdateWorkflowRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_workflow_id: str, + *, + body: ServiceUpdateWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/install-workflows/{install_workflow_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """update an install workflow + + Args: + install_workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """update an install workflow + + Args: + install_workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_workflow_id=install_workflow_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """update an install workflow + + Args: + install_workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_workflow_id=install_workflow_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """update an install workflow + + Args: + install_workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_workflow_id=install_workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/update_workflow.py b/nuon/api/installs/update_workflow.py new file mode 100644 index 00000000..b24b2cf3 --- /dev/null +++ b/nuon/api/installs/update_workflow.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_workflow import AppWorkflow +from ...models.service_update_workflow_request import ServiceUpdateWorkflowRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + *, + body: ServiceUpdateWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/workflows/{workflow_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """update a workflow + + Args: + workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """update a workflow + + Args: + workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Response[Union[AppWorkflow, StderrErrResponse]]: + """update a workflow + + Args: + workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateWorkflowRequest, +) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + """update a workflow + + Args: + workflow_id (str): + body (ServiceUpdateWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/orgs/__init__.py b/nuon/api/orgs/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/orgs/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/orgs/add_user.py b/nuon/api/orgs/add_user.py new file mode 100644 index 00000000..1ce904e6 --- /dev/null +++ b/nuon/api/orgs/add_user.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.service_create_org_user_request import ServiceCreateOrgUserRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateOrgUserRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/orgs/current/user", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAccount.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgUserRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Add a user to the current org + + Args: + body (ServiceCreateOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgUserRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Add a user to the current org + + Args: + body (ServiceCreateOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgUserRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Add a user to the current org + + Args: + body (ServiceCreateOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgUserRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Add a user to the current org + + Args: + body (ServiceCreateOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/orgs/create_org.py b/nuon/api/orgs/create_org.py new file mode 100644 index 00000000..2552c2b0 --- /dev/null +++ b/nuon/api/orgs/create_org.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_org import AppOrg +from ...models.service_create_org_request import ServiceCreateOrgRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateOrgRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/orgs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppOrg, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppOrg.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppOrg, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgRequest, +) -> Response[Union[AppOrg, StderrErrResponse]]: + """create a new org + + Args: + body (ServiceCreateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrg, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgRequest, +) -> Optional[Union[AppOrg, StderrErrResponse]]: + """create a new org + + Args: + body (ServiceCreateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrg, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgRequest, +) -> Response[Union[AppOrg, StderrErrResponse]]: + """create a new org + + Args: + body (ServiceCreateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrg, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgRequest, +) -> Optional[Union[AppOrg, StderrErrResponse]]: + """create a new org + + Args: + body (ServiceCreateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrg, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/orgs/create_org_invite.py b/nuon/api/orgs/create_org_invite.py new file mode 100644 index 00000000..0a7f3135 --- /dev/null +++ b/nuon/api/orgs/create_org_invite.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_org_invite import AppOrgInvite +from ...models.service_create_org_invite_request import ServiceCreateOrgInviteRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateOrgInviteRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/orgs/current/invites", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppOrgInvite.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppOrgInvite, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgInviteRequest, +) -> Response[Union[AppOrgInvite, StderrErrResponse]]: + """Invite a user to the current org + + Invite a user (by email) to an org. + + This user will receive an email, and when they next log into the application will be added to the + org. + + Args: + body (ServiceCreateOrgInviteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrgInvite, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgInviteRequest, +) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: + """Invite a user to the current org + + Invite a user (by email) to an org. + + This user will receive an email, and when they next log into the application will be added to the + org. + + Args: + body (ServiceCreateOrgInviteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrgInvite, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgInviteRequest, +) -> Response[Union[AppOrgInvite, StderrErrResponse]]: + """Invite a user to the current org + + Invite a user (by email) to an org. + + This user will receive an email, and when they next log into the application will be added to the + org. + + Args: + body (ServiceCreateOrgInviteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrgInvite, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateOrgInviteRequest, +) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: + """Invite a user to the current org + + Invite a user (by email) to an org. + + This user will receive an email, and when they next log into the application will be added to the + org. + + Args: + body (ServiceCreateOrgInviteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrgInvite, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/orgs/delete_org.py b/nuon/api/orgs/delete_org.py new file mode 100644 index 00000000..9996fbff --- /dev/null +++ b/nuon/api/orgs/delete_org.py @@ -0,0 +1,145 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/orgs/current", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """Delete an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """Delete an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """Delete an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """Delete an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/orgs/get_org.py b/nuon/api/orgs/get_org.py new file mode 100644 index 00000000..89f03789 --- /dev/null +++ b/nuon/api/orgs/get_org.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_org import AppOrg +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/orgs/current", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppOrg, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppOrg.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppOrg, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppOrg, StderrErrResponse]]: + """Get an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrg, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppOrg, StderrErrResponse]]: + """Get an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrg, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppOrg, StderrErrResponse]]: + """Get an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrg, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppOrg, StderrErrResponse]]: + """Get an org + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrg, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/orgs/get_org_acounts.py b/nuon/api/orgs/get_org_acounts.py new file mode 100644 index 00000000..0e366525 --- /dev/null +++ b/nuon/api/orgs/get_org_acounts.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/orgs/current/accounts", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get user accounts for current org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get user accounts for current org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get user accounts for current org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get user accounts for current org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/orgs/get_org_invites.py b/nuon/api/orgs/get_org_invites.py new file mode 100644 index 00000000..48e369d3 --- /dev/null +++ b/nuon/api/orgs/get_org_invites.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_org_invite import AppOrgInvite +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/orgs/current/invites", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppOrgInvite.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: + """Return org invites + + Returns a list of all invites to the org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppOrgInvite']]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: + """Return org invites + + Returns a list of all invites to the org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppOrgInvite']] + """ + + return sync_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: + """Return org invites + + Returns a list of all invites to the org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppOrgInvite']]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: + """Return org invites + + Returns a list of all invites to the org. + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppOrgInvite']] + """ + + return ( + await asyncio_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/orgs/get_org_runner_group.py b/nuon/api/orgs/get_org_runner_group.py new file mode 100644 index 00000000..ff2f648b --- /dev/null +++ b/nuon/api/orgs/get_org_runner_group.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_group import AppRunnerGroup +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/orgs/current/runner-group", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerGroup.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an org's runner group + + Get the current org's runner group, which includes the runners and their settings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerGroup, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an org's runner group + + Get the current org's runner group, which includes the runners and their settings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerGroup, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an org's runner group + + Get the current org's runner group, which includes the runners and their settings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerGroup, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + """Get an org's runner group + + Get the current org's runner group, which includes the runners and their settings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerGroup, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/orgs/get_orgs.py b/nuon/api/orgs/get_orgs.py new file mode 100644 index 00000000..28903731 --- /dev/null +++ b/nuon/api/orgs/get_orgs.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_org import AppOrg +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["q"] = q + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/orgs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppOrg.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: + """Return current user's orgs + + Args: + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppOrg']]] + """ + + kwargs = _get_kwargs( + q=q, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: + """Return current user's orgs + + Args: + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppOrg']] + """ + + return sync_detailed( + client=client, + q=q, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: + """Return current user's orgs + + Args: + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppOrg']]] + """ + + kwargs = _get_kwargs( + q=q, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: + """Return current user's orgs + + Args: + q (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppOrg']] + """ + + return ( + await asyncio_detailed( + client=client, + q=q, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/orgs/remove_user.py b/nuon/api/orgs/remove_user.py new file mode 100644 index 00000000..6dcfa533 --- /dev/null +++ b/nuon/api/orgs/remove_user.py @@ -0,0 +1,188 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.service_remove_org_user_request import ServiceRemoveOrgUserRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceRemoveOrgUserRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/orgs/current/remove-user", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAccount.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceRemoveOrgUserRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Remove a user from the current org + + Remove a user from an org. + + Args: + body (ServiceRemoveOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceRemoveOrgUserRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Remove a user from the current org + + Remove a user from an org. + + Args: + body (ServiceRemoveOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceRemoveOrgUserRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Remove a user from the current org + + Remove a user from an org. + + Args: + body (ServiceRemoveOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceRemoveOrgUserRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Remove a user from the current org + + Remove a user from an org. + + Args: + body (ServiceRemoveOrgUserRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/orgs/update_org.py b/nuon/api/orgs/update_org.py new file mode 100644 index 00000000..c2f197cb --- /dev/null +++ b/nuon/api/orgs/update_org.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_org import AppOrg +from ...models.service_update_org_request import ServiceUpdateOrgRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceUpdateOrgRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/v1/orgs/current", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppOrg, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppOrg.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppOrg, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceUpdateOrgRequest, +) -> Response[Union[AppOrg, StderrErrResponse]]: + """Update current org + + Args: + body (ServiceUpdateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrg, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceUpdateOrgRequest, +) -> Optional[Union[AppOrg, StderrErrResponse]]: + """Update current org + + Args: + body (ServiceUpdateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrg, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceUpdateOrgRequest, +) -> Response[Union[AppOrg, StderrErrResponse]]: + """Update current org + + Args: + body (ServiceUpdateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppOrg, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceUpdateOrgRequest, +) -> Optional[Union[AppOrg, StderrErrResponse]]: + """Update current org + + Args: + body (ServiceUpdateOrgRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppOrg, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/releases/__init__.py b/nuon/api/releases/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/releases/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/releases/create_component_release.py b/nuon/api/releases/create_component_release.py new file mode 100644 index 00000000..fbba32aa --- /dev/null +++ b/nuon/api/releases/create_component_release.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_release import AppComponentRelease +from ...models.service_create_component_release_request import ServiceCreateComponentReleaseRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + component_id: str, + *, + body: ServiceCreateComponentReleaseRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/components/{component_id}/releases", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppComponentRelease.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentReleaseRequest, +) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + """create a release + + Args: + component_id (str): + body (ServiceCreateComponentReleaseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentRelease, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentReleaseRequest, +) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + """create a release + + Args: + component_id (str): + body (ServiceCreateComponentReleaseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentRelease, StderrErrResponse] + """ + + return sync_detailed( + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentReleaseRequest, +) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + """create a release + + Args: + component_id (str): + body (ServiceCreateComponentReleaseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentRelease, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentReleaseRequest, +) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + """create a release + + Args: + component_id (str): + body (ServiceCreateComponentReleaseRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentRelease, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/releases/get_app_releases.py b/nuon/api/releases/get_app_releases.py new file mode 100644 index 00000000..356b612c --- /dev/null +++ b/nuon/api/releases/get_app_releases.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_release import AppComponentRelease +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/releases", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentRelease.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for an app + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentRelease']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for an app + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentRelease']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for an app + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentRelease']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for an app + + Args: + app_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentRelease']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/releases/get_component_releases.py b/nuon/api/releases/get_component_releases.py new file mode 100644 index 00000000..71e84513 --- /dev/null +++ b/nuon/api/releases/get_component_releases.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_release import AppComponentRelease +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/components/{component_id}/releases", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentRelease.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentRelease']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentRelease']] + """ + + return sync_detailed( + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentRelease']]] + """ + + kwargs = _get_kwargs( + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + """get all releases for a component + + Args: + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentRelease']] + """ + + return ( + await asyncio_detailed( + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/releases/get_release.py b/nuon/api/releases/get_release.py new file mode 100644 index 00000000..21bf24a0 --- /dev/null +++ b/nuon/api/releases/get_release.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_release import AppComponentRelease +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + release_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/releases/{release_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentRelease.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + release_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + """get a release + + Args: + release_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentRelease, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + release_id=release_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + release_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + """get a release + + Args: + release_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentRelease, StderrErrResponse] + """ + + return sync_detailed( + release_id=release_id, + client=client, + ).parsed + + +async def asyncio_detailed( + release_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + """get a release + + Args: + release_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentRelease, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + release_id=release_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + release_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + """get a release + + Args: + release_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentRelease, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + release_id=release_id, + client=client, + ) + ).parsed diff --git a/nuon/api/releases/get_release_steps.py b/nuon/api/releases/get_release_steps.py new file mode 100644 index 00000000..8cde182a --- /dev/null +++ b/nuon/api/releases/get_release_steps.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_release_step import AppComponentReleaseStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + release_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/releases/{release_id}/steps", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentReleaseStep.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + release_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + """get a release's steps + + Args: + release_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentReleaseStep']]] + """ + + kwargs = _get_kwargs( + release_id=release_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + release_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + """get a release's steps + + Args: + release_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentReleaseStep']] + """ + + return sync_detailed( + release_id=release_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + release_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + """get a release's steps + + Args: + release_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentReleaseStep']]] + """ + + kwargs = _get_kwargs( + release_id=release_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + release_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + """get a release's steps + + Args: + release_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentReleaseStep']] + """ + + return ( + await asyncio_detailed( + release_id=release_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/__init__.py b/nuon/api/runners/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/runners/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/runners/cancel_runner_job.py b/nuon/api/runners/cancel_runner_job.py new file mode 100644 index 00000000..a3c2d5e0 --- /dev/null +++ b/nuon/api/runners/cancel_runner_job.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job import AppRunnerJob +from ...models.service_cancel_runner_job_request import ServiceCancelRunnerJobRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_job_id: str, + *, + body: ServiceCancelRunnerJobRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/runner-jobs/{runner_job_id}/cancel", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + if response.status_code == 202: + response_202 = AppRunnerJob.from_dict(response.json()) + + return response_202 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, + body: ServiceCancelRunnerJobRequest, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """cancel runner job + + Cancel a runner job. + + Args: + runner_job_id (str): + body (ServiceCancelRunnerJobRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_job_id: str, + *, + client: AuthenticatedClient, + body: ServiceCancelRunnerJobRequest, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """cancel runner job + + Cancel a runner job. + + Args: + runner_job_id (str): + body (ServiceCancelRunnerJobRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return sync_detailed( + runner_job_id=runner_job_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, + body: ServiceCancelRunnerJobRequest, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """cancel runner job + + Cancel a runner job. + + Args: + runner_job_id (str): + body (ServiceCancelRunnerJobRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_job_id: str, + *, + client: AuthenticatedClient, + body: ServiceCancelRunnerJobRequest, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """cancel runner job + + Cancel a runner job. + + Args: + runner_job_id (str): + body (ServiceCancelRunnerJobRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_job_id=runner_job_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/create_terraform_workspace.py b/nuon/api/runners/create_terraform_workspace.py new file mode 100644 index 00000000..89a3d3b4 --- /dev/null +++ b/nuon/api/runners/create_terraform_workspace.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace import AppTerraformWorkspace +from ...models.service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateTerraformWorkspaceRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/terraform-workspace", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppTerraformWorkspace.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspace, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspace, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspace, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspace, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/create_terraform_workspace_v2.py b/nuon/api/runners/create_terraform_workspace_v2.py new file mode 100644 index 00000000..fa8d3ab3 --- /dev/null +++ b/nuon/api/runners/create_terraform_workspace_v2.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace import AppTerraformWorkspace +from ...models.service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateTerraformWorkspaceRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/terraform-workspaces", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppTerraformWorkspace.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspace, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspace, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspace, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspace, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/delete_terraform_workspace.py b/nuon/api/runners/delete_terraform_workspace.py new file mode 100644 index 00000000..b9118fe7 --- /dev/null +++ b/nuon/api/runners/delete_terraform_workspace.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace import AppTerraformWorkspace +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/terraform-workspaces/{workspace_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspace.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """delete terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """delete terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspace']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """delete terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """delete terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspace']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/force_shut_down_runner.py b/nuon/api/runners/force_shut_down_runner.py new file mode 100644 index 00000000..f077148a --- /dev/null +++ b/nuon/api/runners/force_shut_down_runner.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_force_shutdown_request import ServiceForceShutdownRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + *, + body: ServiceForceShutdownRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/runners/{runner_id}/force-shutdown", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 201: + response_201 = cast(bool, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceForceShutdownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """force shut down a runner + + Force shutdown a runner. + + This will result in jobs being lost/cancelled if they are in-flight. + + Args: + runner_id (str): + body (ServiceForceShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceForceShutdownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """force shut down a runner + + Force shutdown a runner. + + This will result in jobs being lost/cancelled if they are in-flight. + + Args: + runner_id (str): + body (ServiceForceShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceForceShutdownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """force shut down a runner + + Force shutdown a runner. + + This will result in jobs being lost/cancelled if they are in-flight. + + Args: + runner_id (str): + body (ServiceForceShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceForceShutdownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """force shut down a runner + + Force shutdown a runner. + + This will result in jobs being lost/cancelled if they are in-flight. + + Args: + runner_id (str): + body (ServiceForceShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/get_latest_runner_heart_beat.py b/nuon/api/runners/get_latest_runner_heart_beat.py new file mode 100644 index 00000000..a46d615f --- /dev/null +++ b/nuon/api/runners/get_latest_runner_heart_beat.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_latest_runner_heart_beats import ServiceLatestRunnerHeartBeats +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/heart-beats/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceLatestRunnerHeartBeats.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceLatestRunnerHeartBeats, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceLatestRunnerHeartBeats, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_log_stream.py b/nuon/api/runners/get_log_stream.py new file mode 100644 index 00000000..83c47701 --- /dev/null +++ b/nuon/api/runners/get_log_stream.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_log_stream import AppLogStream +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + log_stream_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/log-streams/{log_stream_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppLogStream, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppLogStream.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppLogStream, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + log_stream_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppLogStream, StderrErrResponse]]: + """get a log stream + + Return a log stream. + + Args: + log_stream_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppLogStream, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + log_stream_id=log_stream_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + log_stream_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppLogStream, StderrErrResponse]]: + """get a log stream + + Return a log stream. + + Args: + log_stream_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppLogStream, StderrErrResponse] + """ + + return sync_detailed( + log_stream_id=log_stream_id, + client=client, + ).parsed + + +async def asyncio_detailed( + log_stream_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppLogStream, StderrErrResponse]]: + """get a log stream + + Return a log stream. + + Args: + log_stream_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppLogStream, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + log_stream_id=log_stream_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + log_stream_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppLogStream, StderrErrResponse]]: + """get a log stream + + Return a log stream. + + Args: + log_stream_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppLogStream, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + log_stream_id=log_stream_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_connect_status.py b/nuon/api/runners/get_runner_connect_status.py new file mode 100644 index 00000000..730477b0 --- /dev/null +++ b/nuon/api/runners/get_runner_connect_status.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_runner_connection_status import ServiceRunnerConnectionStatus +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/connected", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceRunnerConnectionStatus.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + """get a runner connection satus based on heartbeat + + # get runner connect status + + The connected status is based on runner heartbeat: + + if no heart beat found — false + if heart beat > 15 seconds ago — false, hb timestamp + if the heart beat < 15 seconds ago — true + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + """get a runner connection satus based on heartbeat + + # get runner connect status + + The connected status is based on runner heartbeat: + + if no heart beat found — false + if heart beat > 15 seconds ago — false, hb timestamp + if the heart beat < 15 seconds ago — true + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRunnerConnectionStatus, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + """get a runner connection satus based on heartbeat + + # get runner connect status + + The connected status is based on runner heartbeat: + + if no heart beat found — false + if heart beat > 15 seconds ago — false, hb timestamp + if the heart beat < 15 seconds ago — true + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + """get a runner connection satus based on heartbeat + + # get runner connect status + + The connected status is based on runner heartbeat: + + if no heart beat found — false + if heart beat > 15 seconds ago — false, hb timestamp + if the heart beat < 15 seconds ago — true + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRunnerConnectionStatus, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job.py b/nuon/api/runners/get_runner_job.py new file mode 100644 index 00000000..787f6d51 --- /dev/null +++ b/nuon/api/runners/get_runner_job.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job import AppRunnerJob +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner-jobs/{runner_job_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerJob.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return sync_detailed( + runner_job_id=runner_job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_job_id=runner_job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_composite_plan.py b/nuon/api/runners/get_runner_job_composite_plan.py new file mode 100644 index 00000000..724a7761 --- /dev/null +++ b/nuon/api/runners/get_runner_job_composite_plan.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plantypes_composite_plan import PlantypesCompositePlan +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner-jobs/{runner_job_id}/composite-plan", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + if response.status_code == 200: + response_200 = PlantypesCompositePlan.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[PlantypesCompositePlan, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[PlantypesCompositePlan, StderrErrResponse] + """ + + return sync_detailed( + runner_job_id=runner_job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[PlantypesCompositePlan, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[PlantypesCompositePlan, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_job_id=runner_job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_plan.py b/nuon/api/runners/get_runner_job_plan.py new file mode 100644 index 00000000..86b42871 --- /dev/null +++ b/nuon/api/runners/get_runner_job_plan.py @@ -0,0 +1,177 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner-jobs/{runner_job_id}/plan", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 200: + response_200 = cast(str, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + runner_job_id=runner_job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + runner_job_id=runner_job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_plan_v2.py b/nuon/api/runners/get_runner_job_plan_v2.py new file mode 100644 index 00000000..a2e13ea5 --- /dev/null +++ b/nuon/api/runners/get_runner_job_plan_v2.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner/{runner_id}/jobs/{job_id}/plan", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 200: + response_200 = cast(str, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_v2.py b/nuon/api/runners/get_runner_job_v2.py new file mode 100644 index 00000000..acafd0f5 --- /dev/null +++ b/nuon/api/runners/get_runner_job_v2.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job import AppRunnerJob +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/jobs/{job_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerJob.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_jobs.py b/nuon/api/runners/get_runner_jobs.py new file mode 100644 index 00000000..043b5017 --- /dev/null +++ b/nuon/api/runners/get_runner_jobs.py @@ -0,0 +1,295 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job import AppRunnerJob +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + runner_id: str, + *, + group: Union[Unset, str] = UNSET, + groups: Union[Unset, str] = UNSET, + status: Union[Unset, str] = UNSET, + statuses: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["group"] = group + + params["groups"] = groups + + params["status"] = status + + params["statuses"] = statuses + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/jobs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppRunnerJob.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + group: Union[Unset, str] = UNSET, + groups: Union[Unset, str] = UNSET, + status: Union[Unset, str] = UNSET, + statuses: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: + """get runner jobs + + Return runner jobs. + + Args: + runner_id (str): + group (Union[Unset, str]): + groups (Union[Unset, str]): + status (Union[Unset, str]): + statuses (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppRunnerJob']]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + group=group, + groups=groups, + status=status, + statuses=statuses, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + group: Union[Unset, str] = UNSET, + groups: Union[Unset, str] = UNSET, + status: Union[Unset, str] = UNSET, + statuses: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: + """get runner jobs + + Return runner jobs. + + Args: + runner_id (str): + group (Union[Unset, str]): + groups (Union[Unset, str]): + status (Union[Unset, str]): + statuses (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppRunnerJob']] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + group=group, + groups=groups, + status=status, + statuses=statuses, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + group: Union[Unset, str] = UNSET, + groups: Union[Unset, str] = UNSET, + status: Union[Unset, str] = UNSET, + statuses: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: + """get runner jobs + + Return runner jobs. + + Args: + runner_id (str): + group (Union[Unset, str]): + groups (Union[Unset, str]): + status (Union[Unset, str]): + statuses (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppRunnerJob']]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + group=group, + groups=groups, + status=status, + statuses=statuses, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + group: Union[Unset, str] = UNSET, + groups: Union[Unset, str] = UNSET, + status: Union[Unset, str] = UNSET, + statuses: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: + """get runner jobs + + Return runner jobs. + + Args: + runner_id (str): + group (Union[Unset, str]): + groups (Union[Unset, str]): + status (Union[Unset, str]): + statuses (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppRunnerJob']] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + group=group, + groups=groups, + status=status, + statuses=statuses, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_latest_heart_beat.py b/nuon/api/runners/get_runner_latest_heart_beat.py new file mode 100644 index 00000000..61170a4b --- /dev/null +++ b/nuon/api/runners/get_runner_latest_heart_beat.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_heart_beat import AppRunnerHeartBeat +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/latest-heart-beat", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerHeartBeat.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: + """get the latest heartbeats for a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerHeartBeat, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: + """get the latest heartbeats for a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerHeartBeat, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: + """get the latest heartbeats for a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerHeartBeat, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: + """get the latest heartbeats for a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerHeartBeat, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_recent_health_checks.py b/nuon/api/runners/get_runner_recent_health_checks.py new file mode 100644 index 00000000..d90e7f88 --- /dev/null +++ b/nuon/api/runners/get_runner_recent_health_checks.py @@ -0,0 +1,253 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_health_check import AppRunnerHealthCheck +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + runner_id: str, + *, + window: Union[Unset, str] = "1h", + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_nuon_pagination_enabled, Unset): + headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" + + params: dict[str, Any] = {} + + params["window"] = window + + params["offset"] = offset + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/recent-health-checks", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppRunnerHealthCheck.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + window: Union[Unset, str] = "1h", + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + """get recent health checks + + + + Args: + runner_id (str): + window (Union[Unset, str]): Default: '1h'. + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + x_nuon_pagination_enabled (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppRunnerHealthCheck']]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + window=window, + offset=offset, + limit=limit, + x_nuon_pagination_enabled=x_nuon_pagination_enabled, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + window: Union[Unset, str] = "1h", + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + """get recent health checks + + + + Args: + runner_id (str): + window (Union[Unset, str]): Default: '1h'. + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + x_nuon_pagination_enabled (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppRunnerHealthCheck']] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + window=window, + offset=offset, + limit=limit, + x_nuon_pagination_enabled=x_nuon_pagination_enabled, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + window: Union[Unset, str] = "1h", + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + """get recent health checks + + + + Args: + runner_id (str): + window (Union[Unset, str]): Default: '1h'. + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + x_nuon_pagination_enabled (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppRunnerHealthCheck']]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + window=window, + offset=offset, + limit=limit, + x_nuon_pagination_enabled=x_nuon_pagination_enabled, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + window: Union[Unset, str] = "1h", + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + """get recent health checks + + + + Args: + runner_id (str): + window (Union[Unset, str]): Default: '1h'. + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + x_nuon_pagination_enabled (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppRunnerHealthCheck']] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + window=window, + offset=offset, + limit=limit, + x_nuon_pagination_enabled=x_nuon_pagination_enabled, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_settings.py b/nuon/api/runners/get_runner_settings.py new file mode 100644 index 00000000..3162b948 --- /dev/null +++ b/nuon/api/runners/get_runner_settings.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_group_settings import AppRunnerGroupSettings +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/settings", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerGroupSettings.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: + """get runner settings + + Return runner settings for the provided runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerGroupSettings, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: + """get runner settings + + Return runner settings for the provided runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerGroupSettings, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: + """get runner settings + + Return runner settings for the provided runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerGroupSettings, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: + """get runner settings + + Return runner settings for the provided runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerGroupSettings, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_current_state_data.py b/nuon/api/runners/get_terraform_current_state_data.py new file mode 100644 index 00000000..ba6ffec3 --- /dev/null +++ b/nuon/api/runners/get_terraform_current_state_data.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/terraform-backend", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get current terraform + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get current terraform + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get current terraform + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get current terraform + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_states.py b/nuon/api/runners/get_terraform_states.py new file mode 100644 index 00000000..a4afc9b5 --- /dev/null +++ b/nuon/api/runners/get_terraform_states.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/terraform-workspace/{workspace_id}/states", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspaceState.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceState']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceState']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_states_v2.py b/nuon/api/runners/get_terraform_states_v2.py new file mode 100644 index 00000000..4e4b7231 --- /dev/null +++ b/nuon/api/runners/get_terraform_states_v2.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspace/{workspace_id}/states", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspaceState.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceState']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceState']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace.py b/nuon/api/runners/get_terraform_workspace.py new file mode 100644 index 00000000..9751df34 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace import AppTerraformWorkspace +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspace.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspace']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspace + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspace']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_lock.py b/nuon/api/runners/get_terraform_workspace_lock.py new file mode 100644 index 00000000..348e0a9e --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_lock.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_lock import AppTerraformWorkspaceLock +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/lock", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceLock.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + """get terraform workspace lock + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + """get terraform workspace lock + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceLock, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + """get terraform workspace lock + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + """get terraform workspace lock + + Args: + workspace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceLock, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_by_id.py b/nuon/api/runners/get_terraform_workspace_state_by_id.py new file mode 100644 index 00000000..8a65653e --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_by_id.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/terraform-workspace/{workspace_id}/states/{state_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_by_idv2.py b/nuon/api/runners/get_terraform_workspace_state_by_idv2.py new file mode 100644 index 00000000..1a9b84e6 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_by_idv2.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/states/{state_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_json_resources.py b/nuon/api/runners/get_terraform_workspace_state_json_resources.py new file mode 100644 index 00000000..35bd283e --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_json_resources.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_terraform_workspace_state_json_resources_response_200 import ( + GetTerraformWorkspaceStateJSONResourcesResponse200, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/terraform-workspace/{workspace_id}/state-json/{state_id}/resources", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetTerraformWorkspaceStateJSONResourcesResponse200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py b/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py new file mode 100644 index 00000000..2a987421 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_terraform_workspace_state_json_resources_v2_response_200 import ( + GetTerraformWorkspaceStateJSONResourcesV2Response200, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspace/{workspace_id}/state-json/{state_id}/resources", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetTerraformWorkspaceStateJSONResourcesV2Response200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_resources.py b/nuon/api/runners/get_terraform_workspace_state_resources.py new file mode 100644 index 00000000..aa5c74ee --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_resources.py @@ -0,0 +1,189 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_state_resource import AppTerraformStateResource +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/terraform-workspace/{workspace_id}/states/{state_id}/resources", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformStateResource.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + """get terraform state resources + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformStateResource']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + """get terraform state resources + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformStateResource']] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + """get terraform state resources + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformStateResource']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + """get terraform state resources + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformStateResource']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json.py b/nuon/api/runners/get_terraform_workspace_states_json.py new file mode 100644 index 00000000..6f5ba956 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_states_json.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/terraform-workspace/{workspace_id}/state-json", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspaceStateJSON.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json_by_id.py b/nuon/api/runners/get_terraform_workspace_states_json_by_id.py new file mode 100644 index 00000000..186a8991 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_states_json_by_id.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_terraform_workspace_states_json_by_id_response_200 import ( + GetTerraformWorkspaceStatesJSONByIDResponse200, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/terraform-workspace/{workspace_id}/state-json/{state_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetTerraformWorkspaceStatesJSONByIDResponse200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py b/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py new file mode 100644 index 00000000..ce9ec0b3 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_terraform_workspace_states_json_by_idv2_response_200 import ( + GetTerraformWorkspaceStatesJSONByIDV2Response200, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/state-json/{state_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetTerraformWorkspaceStatesJSONByIDV2Response200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_jsonv2.py b/nuon/api/runners/get_terraform_workspace_states_jsonv2.py new file mode 100644 index 00000000..e476f0be --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_states_jsonv2.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/state-json", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspaceStateJSON.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspaces.py b/nuon/api/runners/get_terraform_workspaces.py new file mode 100644 index 00000000..164a0685 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspaces.py @@ -0,0 +1,152 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace import AppTerraformWorkspace +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/terraform-workspaces", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspace.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspaces + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspaces + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspace']] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspaces + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + """get terraform workspaces + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspace']] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/runners/graceful_shut_down_runner.py b/nuon/api/runners/graceful_shut_down_runner.py new file mode 100644 index 00000000..e618548c --- /dev/null +++ b/nuon/api/runners/graceful_shut_down_runner.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_graceful_shutdown_request import ServiceGracefulShutdownRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + *, + body: ServiceGracefulShutdownRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/runners/{runner_id}/graceful-shutdown", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 201: + response_201 = cast(bool, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceGracefulShutdownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """shut down a runner + + Gracefully shut down a runner. + + _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force + shut down instead. + + Args: + runner_id (str): + body (ServiceGracefulShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceGracefulShutdownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """shut down a runner + + Gracefully shut down a runner. + + _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force + shut down instead. + + Args: + runner_id (str): + body (ServiceGracefulShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceGracefulShutdownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """shut down a runner + + Gracefully shut down a runner. + + _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force + shut down instead. + + Args: + runner_id (str): + body (ServiceGracefulShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceGracefulShutdownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """shut down a runner + + Gracefully shut down a runner. + + _NOTE_ when a runner is unhealthy, the runner will not be able to pick up this job, so use force + shut down instead. + + Args: + runner_id (str): + body (ServiceGracefulShutdownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/lock_terraform_workspace.py b/nuon/api/runners/lock_terraform_workspace.py new file mode 100644 index 00000000..2222adb9 --- /dev/null +++ b/nuon/api/runners/lock_terraform_workspace.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.lock_terraform_workspace_body import LockTerraformWorkspaceBody +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + body: LockTerraformWorkspaceBody, + job_id: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["job_id"] = job_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/terraform-workspaces/{workspace_id}/lock", + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + body: LockTerraformWorkspaceBody, + job_id: Union[Unset, str] = UNSET, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """lock terraform state + + Args: + workspace_id (str): + job_id (Union[Unset, str]): + body (LockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + job_id=job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + body: LockTerraformWorkspaceBody, + job_id: Union[Unset, str] = UNSET, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """lock terraform state + + Args: + workspace_id (str): + job_id (Union[Unset, str]): + body (LockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + body=body, + job_id=job_id, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + body: LockTerraformWorkspaceBody, + job_id: Union[Unset, str] = UNSET, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """lock terraform state + + Args: + workspace_id (str): + job_id (Union[Unset, str]): + body (LockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + job_id=job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + body: LockTerraformWorkspaceBody, + job_id: Union[Unset, str] = UNSET, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """lock terraform state + + Args: + workspace_id (str): + job_id (Union[Unset, str]): + body (LockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + body=body, + job_id=job_id, + ) + ).parsed diff --git a/nuon/api/runners/log_stream_read_logs.py b/nuon/api/runners/log_stream_read_logs.py new file mode 100644 index 00000000..568ee913 --- /dev/null +++ b/nuon/api/runners/log_stream_read_logs.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_otel_log_record import AppOtelLogRecord +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + log_stream_id: str, + *, + x_nuon_api_offset: str, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + headers["X-Nuon-API-Offset"] = x_nuon_api_offset + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/log-streams/{log_stream_id}/logs", + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppOtelLogRecord.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + log_stream_id: str, + *, + client: AuthenticatedClient, + x_nuon_api_offset: str, +) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + """read a log stream's logs + + Read OTEL formatted logs for a log stream. + + Args: + log_stream_id (str): + x_nuon_api_offset (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppOtelLogRecord']]] + """ + + kwargs = _get_kwargs( + log_stream_id=log_stream_id, + x_nuon_api_offset=x_nuon_api_offset, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + log_stream_id: str, + *, + client: AuthenticatedClient, + x_nuon_api_offset: str, +) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + """read a log stream's logs + + Read OTEL formatted logs for a log stream. + + Args: + log_stream_id (str): + x_nuon_api_offset (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppOtelLogRecord']] + """ + + return sync_detailed( + log_stream_id=log_stream_id, + client=client, + x_nuon_api_offset=x_nuon_api_offset, + ).parsed + + +async def asyncio_detailed( + log_stream_id: str, + *, + client: AuthenticatedClient, + x_nuon_api_offset: str, +) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + """read a log stream's logs + + Read OTEL formatted logs for a log stream. + + Args: + log_stream_id (str): + x_nuon_api_offset (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppOtelLogRecord']]] + """ + + kwargs = _get_kwargs( + log_stream_id=log_stream_id, + x_nuon_api_offset=x_nuon_api_offset, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + log_stream_id: str, + *, + client: AuthenticatedClient, + x_nuon_api_offset: str, +) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + """read a log stream's logs + + Read OTEL formatted logs for a log stream. + + Args: + log_stream_id (str): + x_nuon_api_offset (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppOtelLogRecord']] + """ + + return ( + await asyncio_detailed( + log_stream_id=log_stream_id, + client=client, + x_nuon_api_offset=x_nuon_api_offset, + ) + ).parsed diff --git a/nuon/api/runners/mng_vm_shut_down.py b/nuon/api/runners/mng_vm_shut_down.py new file mode 100644 index 00000000..42758447 --- /dev/null +++ b/nuon/api/runners/mng_vm_shut_down.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_mng_vm_shut_down_request import ServiceMngVMShutDownRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + *, + body: ServiceMngVMShutDownRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/runners/{runner_id}/mng/shutdown-vm", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 201: + response_201 = cast(bool, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngVMShutDownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """shut down an install runner VM + + Args: + runner_id (str): + body (ServiceMngVMShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngVMShutDownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """shut down an install runner VM + + Args: + runner_id (str): + body (ServiceMngVMShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngVMShutDownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """shut down an install runner VM + + Args: + runner_id (str): + body (ServiceMngVMShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngVMShutDownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """shut down an install runner VM + + Args: + runner_id (str): + body (ServiceMngVMShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/shut_down_runner_mng.py b/nuon/api/runners/shut_down_runner_mng.py new file mode 100644 index 00000000..441dfe1f --- /dev/null +++ b/nuon/api/runners/shut_down_runner_mng.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_mng_shut_down_request import ServiceMngShutDownRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + *, + body: ServiceMngShutDownRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/runners/{runner_id}/mng/shutdown", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 201: + response_201 = cast(bool, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngShutDownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """shut down an install runner management process + + Args: + runner_id (str): + body (ServiceMngShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngShutDownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """shut down an install runner management process + + Args: + runner_id (str): + body (ServiceMngShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngShutDownRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """shut down an install runner management process + + Args: + runner_id (str): + body (ServiceMngShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngShutDownRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """shut down an install runner management process + + Args: + runner_id (str): + body (ServiceMngShutDownRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/unlock_terraform_workspace.py b/nuon/api/runners/unlock_terraform_workspace.py new file mode 100644 index 00000000..ee194f3e --- /dev/null +++ b/nuon/api/runners/unlock_terraform_workspace.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...models.unlock_terraform_workspace_body import UnlockTerraformWorkspaceBody +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + *, + body: UnlockTerraformWorkspaceBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/terraform-workspaces/{workspace_id}/unlock", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + body: UnlockTerraformWorkspaceBody, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """unlock terraform workspace + + Args: + workspace_id (str): + body (UnlockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + body: UnlockTerraformWorkspaceBody, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """unlock terraform workspace + + Args: + workspace_id (str): + body (UnlockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + body: UnlockTerraformWorkspaceBody, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """unlock terraform workspace + + Args: + workspace_id (str): + body (UnlockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + body: UnlockTerraformWorkspaceBody, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """unlock terraform workspace + + Args: + workspace_id (str): + body (UnlockTerraformWorkspaceBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/update_runner_mng.py b/nuon/api/runners/update_runner_mng.py new file mode 100644 index 00000000..ea7aa5f7 --- /dev/null +++ b/nuon/api/runners/update_runner_mng.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_mng_update_request import ServiceMngUpdateRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + *, + body: ServiceMngUpdateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/runners/{runner_id}/mng/update", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 201: + response_201 = cast(bool, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngUpdateRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """update an install runner via the mng process + + Args: + runner_id (str): + body (ServiceMngUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngUpdateRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """update an install runner via the mng process + + Args: + runner_id (str): + body (ServiceMngUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngUpdateRequest, +) -> Response[Union[StderrErrResponse, bool]]: + """update an install runner via the mng process + + Args: + runner_id (str): + body (ServiceMngUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceMngUpdateRequest, +) -> Optional[Union[StderrErrResponse, bool]]: + """update an install runner via the mng process + + Args: + runner_id (str): + body (ServiceMngUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/update_runner_settings.py b/nuon/api/runners/update_runner_settings.py new file mode 100644 index 00000000..7d6a7d1e --- /dev/null +++ b/nuon/api/runners/update_runner_settings.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job_execution import AppRunnerJobExecution +from ...models.service_update_runner_settings_request import ServiceUpdateRunnerSettingsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + *, + body: ServiceUpdateRunnerSettingsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/runners/{runner_id}/settings", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerJobExecution.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateRunnerSettingsRequest, +) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: + """update a runner's settings via its runner settings group + + Args: + runner_id (str): + body (ServiceUpdateRunnerSettingsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJobExecution, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateRunnerSettingsRequest, +) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: + """update a runner's settings via its runner settings group + + Args: + runner_id (str): + body (ServiceUpdateRunnerSettingsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJobExecution, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateRunnerSettingsRequest, +) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: + """update a runner's settings via its runner settings group + + Args: + runner_id (str): + body (ServiceUpdateRunnerSettingsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJobExecution, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateRunnerSettingsRequest, +) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: + """update a runner's settings via its runner settings group + + Args: + runner_id (str): + body (ServiceUpdateRunnerSettingsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJobExecution, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/update_terraform_state.py b/nuon/api/runners/update_terraform_state.py new file mode 100644 index 00000000..31f4178a --- /dev/null +++ b/nuon/api/runners/update_terraform_state.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...models.update_terraform_state_body import UpdateTerraformStateBody +from ...types import Response + + +def _get_kwargs( + *, + body: UpdateTerraformStateBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/terraform-backend", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: UpdateTerraformStateBody, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """update terraform state + + Args: + body (UpdateTerraformStateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: UpdateTerraformStateBody, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """update terraform state + + Args: + body (UpdateTerraformStateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: UpdateTerraformStateBody, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """update terraform state + + Args: + body (UpdateTerraformStateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: UpdateTerraformStateBody, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """update terraform state + + Args: + body (UpdateTerraformStateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runnersrunner/__init__.py b/nuon/api/runnersrunner/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/runnersrunner/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/runnersrunner/get_runner.py b/nuon/api/runnersrunner/get_runner.py new file mode 100644 index 00000000..8e7e2463 --- /dev/null +++ b/nuon/api/runnersrunner/get_runner.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner import AppRunner +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunner, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunner.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunner, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunner, StderrErrResponse]]: + """get a runner by id + + Return a runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunner, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunner, StderrErrResponse]]: + """get a runner by id + + Return a runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunner, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunner, StderrErrResponse]]: + """get a runner by id + + Return a runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunner, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunner, StderrErrResponse]]: + """get a runner by id + + Return a runner. + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunner, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runnersrunner/get_runner_job_executions.py b/nuon/api/runnersrunner/get_runner_job_executions.py new file mode 100644 index 00000000..7042efcc --- /dev/null +++ b/nuon/api/runnersrunner/get_runner_job_executions.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job_execution import AppRunnerJobExecution +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + runner_job_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner-jobs/{runner_job_id}/executions", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppRunnerJobExecution.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + """get runner job executions + + Return executions for a runner job. + + Args: + runner_job_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppRunnerJobExecution']]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_job_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + """get runner job executions + + Return executions for a runner job. + + Args: + runner_job_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppRunnerJobExecution']] + """ + + return sync_detailed( + runner_job_id=runner_job_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + """get runner job executions + + Return executions for a runner job. + + Args: + runner_job_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppRunnerJobExecution']]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_job_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + """get runner job executions + + Return executions for a runner job. + + Args: + runner_job_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppRunnerJobExecution']] + """ + + return ( + await asyncio_detailed( + runner_job_id=runner_job_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/vcs/__init__.py b/nuon/api/vcs/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/vcs/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/vcs/create_vcs_connection.py b/nuon/api/vcs/create_vcs_connection.py new file mode 100644 index 00000000..ff9e9513 --- /dev/null +++ b/nuon/api/vcs/create_vcs_connection.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_vcs_connection import AppVCSConnection +from ...models.service_create_connection_request import ServiceCreateConnectionRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateConnectionRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/vcs/connections", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppVCSConnection.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateConnectionRequest, +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + """create a vcs connection for Github + + Args: + body (ServiceCreateConnectionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppVCSConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateConnectionRequest, +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + """create a vcs connection for Github + + Args: + body (ServiceCreateConnectionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppVCSConnection, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateConnectionRequest, +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + """create a vcs connection for Github + + Args: + body (ServiceCreateConnectionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppVCSConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateConnectionRequest, +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + """create a vcs connection for Github + + Args: + body (ServiceCreateConnectionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppVCSConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/vcs/create_vcs_connection_callback.py b/nuon/api/vcs/create_vcs_connection_callback.py new file mode 100644 index 00000000..a894d2ba --- /dev/null +++ b/nuon/api/vcs/create_vcs_connection_callback.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_vcs_connection import AppVCSConnection +from ...models.service_create_connection_callback_request import ServiceCreateConnectionCallbackRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateConnectionCallbackRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/vcs/connection-callback", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppVCSConnection.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: ServiceCreateConnectionCallbackRequest, +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + """public connection to create a vcs connection via a callback + + Args: + body (ServiceCreateConnectionCallbackRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppVCSConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Union[AuthenticatedClient, Client], + body: ServiceCreateConnectionCallbackRequest, +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + """public connection to create a vcs connection via a callback + + Args: + body (ServiceCreateConnectionCallbackRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppVCSConnection, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: ServiceCreateConnectionCallbackRequest, +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + """public connection to create a vcs connection via a callback + + Args: + body (ServiceCreateConnectionCallbackRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppVCSConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: Union[AuthenticatedClient, Client], + body: ServiceCreateConnectionCallbackRequest, +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + """public connection to create a vcs connection via a callback + + Args: + body (ServiceCreateConnectionCallbackRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppVCSConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/vcs/delete_vcs_connection.py b/nuon/api/vcs/delete_vcs_connection.py new file mode 100644 index 00000000..ba41ab77 --- /dev/null +++ b/nuon/api/vcs/delete_vcs_connection.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + connection_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/vcs/connections/{connection_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, StderrErrResponse]]: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + connection_id=connection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, StderrErrResponse] + """ + + return sync_detailed( + connection_id=connection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + connection_id=connection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + connection_id=connection_id, + client=client, + ) + ).parsed diff --git a/nuon/api/vcs/get_org_vcs_connections.py b/nuon/api/vcs/get_org_vcs_connections.py new file mode 100644 index 00000000..7c2ab538 --- /dev/null +++ b/nuon/api/vcs/get_org_vcs_connections.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_vcs_connection import AppVCSConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/vcs/connections", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppVCSConnection.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: + """get vcs connection for an org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppVCSConnection']]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: + """get vcs connection for an org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppVCSConnection']] + """ + + return sync_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: + """get vcs connection for an org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppVCSConnection']]] + """ + + kwargs = _get_kwargs( + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: + """get vcs connection for an org + + Args: + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppVCSConnection']] + """ + + return ( + await asyncio_detailed( + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/vcs/get_vcs_connection.py b/nuon/api/vcs/get_vcs_connection.py new file mode 100644 index 00000000..6d162eaa --- /dev/null +++ b/nuon/api/vcs/get_vcs_connection.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_vcs_connection import AppVCSConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + connection_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/vcs/connections/{connection_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppVCSConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + """returns a vcs connection for an org + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppVCSConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + connection_id=connection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + """returns a vcs connection for an org + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppVCSConnection, StderrErrResponse] + """ + + return sync_detailed( + connection_id=connection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + """returns a vcs connection for an org + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppVCSConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + connection_id=connection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + """returns a vcs connection for an org + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppVCSConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + connection_id=connection_id, + client=client, + ) + ).parsed diff --git a/nuon/client.py b/nuon/client.py new file mode 100644 index 00000000..e80446f1 --- /dev/null +++ b/nuon/client.py @@ -0,0 +1,268 @@ +import ssl +from typing import Any, Optional, Union + +import httpx +from attrs import define, evolve, field + + +@define +class Client: + """A class for keeping track of data related to the API + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str = field(alias="base_url") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") + _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + + def with_headers(self, headers: dict[str, str]) -> "Client": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: dict[str, str]) -> "Client": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "Client": + """Get a new client matching this one with a new timeout (in seconds)""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "Client": + """Manually set the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "Client": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": + """Manually the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "Client": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) + + +@define +class AuthenticatedClient: + """A Client which has been authenticated for use on secured endpoints + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + token: The token to use for authentication + prefix: The prefix to use for the Authorization header + auth_header_name: The name of the Authorization header + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str = field(alias="base_url") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") + _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + + token: str + prefix: str = "Bearer" + auth_header_name: str = "Authorization" + + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": + """Get a new client matching this one with a new timeout (in seconds)""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient": + """Manually set the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "AuthenticatedClient": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient": + """Manually the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "AuthenticatedClient": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/nuon/errors.py b/nuon/errors.py new file mode 100644 index 00000000..5f92e76a --- /dev/null +++ b/nuon/errors.py @@ -0,0 +1,16 @@ +"""Contains shared errors types that can be raised from API functions""" + + +class UnexpectedStatus(Exception): + """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" + + def __init__(self, status_code: int, content: bytes): + self.status_code = status_code + self.content = content + + super().__init__( + f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" + ) + + +__all__ = ["UnexpectedStatus"] diff --git a/nuon/models/__init__.py b/nuon/models/__init__.py new file mode 100644 index 00000000..8caa8bc0 --- /dev/null +++ b/nuon/models/__init__.py @@ -0,0 +1,847 @@ +"""Contains all the data models used in inputs/outputs""" + +from .app_account import AppAccount +from .app_account_type import AppAccountType +from .app_action_workflow import AppActionWorkflow +from .app_action_workflow_config import AppActionWorkflowConfig +from .app_action_workflow_step_config import AppActionWorkflowStepConfig +from .app_action_workflow_step_config_env_vars import AppActionWorkflowStepConfigEnvVars +from .app_action_workflow_trigger_config import AppActionWorkflowTriggerConfig +from .app_action_workflow_trigger_type import AppActionWorkflowTriggerType +from .app_app import AppApp +from .app_app_awsiam_policy_config import AppAppAWSIAMPolicyConfig +from .app_app_awsiam_role_config import AppAppAWSIAMRoleConfig +from .app_app_branch import AppAppBranch +from .app_app_break_glass_config import AppAppBreakGlassConfig +from .app_app_config import AppAppConfig +from .app_app_config_status import AppAppConfigStatus +from .app_app_config_version import AppAppConfigVersion +from .app_app_input import AppAppInput +from .app_app_input_config import AppAppInputConfig +from .app_app_input_group import AppAppInputGroup +from .app_app_links import AppAppLinks +from .app_app_permissions_config import AppAppPermissionsConfig +from .app_app_policies_config import AppAppPoliciesConfig +from .app_app_runner_config import AppAppRunnerConfig +from .app_app_runner_config_env_vars import AppAppRunnerConfigEnvVars +from .app_app_runner_config_helm_driver_type import AppAppRunnerConfigHelmDriverType +from .app_app_runner_type import AppAppRunnerType +from .app_app_sandbox_config import AppAppSandboxConfig +from .app_app_sandbox_config_env_vars import AppAppSandboxConfigEnvVars +from .app_app_sandbox_config_variables import AppAppSandboxConfigVariables +from .app_app_secret import AppAppSecret +from .app_app_secret_config import AppAppSecretConfig +from .app_app_secrets_config import AppAppSecretsConfig +from .app_app_stack_config import AppAppStackConfig +from .app_aws_account import AppAWSAccount +from .app_aws_stack_outputs import AppAWSStackOutputs +from .app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns +from .app_awsecr_image_config import AppAWSECRImageConfig +from .app_awsiam_role_type import AppAWSIAMRoleType +from .app_azure_account import AppAzureAccount +from .app_azure_stack_outputs import AppAzureStackOutputs +from .app_cloud_platform import AppCloudPlatform +from .app_cloud_platform_region import AppCloudPlatformRegion +from .app_component import AppComponent +from .app_component_build import AppComponentBuild +from .app_component_build_status import AppComponentBuildStatus +from .app_component_config_connection import AppComponentConfigConnection +from .app_component_links import AppComponentLinks +from .app_component_release import AppComponentRelease +from .app_component_release_step import AppComponentReleaseStep +from .app_component_type import AppComponentType +from .app_composite_status import AppCompositeStatus +from .app_composite_status_metadata import AppCompositeStatusMetadata +from .app_connected_github_vcs_config import AppConnectedGithubVCSConfig +from .app_docker_build_component_config import AppDockerBuildComponentConfig +from .app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars +from .app_drifted_object import AppDriftedObject +from .app_external_image_component_config import AppExternalImageComponentConfig +from .app_helm_chart import AppHelmChart +from .app_helm_component_config import AppHelmComponentConfig +from .app_helm_component_config_values import AppHelmComponentConfigValues +from .app_helm_config import AppHelmConfig +from .app_helm_config_values import AppHelmConfigValues +from .app_helm_release import AppHelmRelease +from .app_install import AppInstall +from .app_install_action_workflow import AppInstallActionWorkflow +from .app_install_action_workflow_run import AppInstallActionWorkflowRun +from .app_install_action_workflow_run_outputs import AppInstallActionWorkflowRunOutputs +from .app_install_action_workflow_run_run_env_vars import AppInstallActionWorkflowRunRunEnvVars +from .app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep +from .app_install_action_workflow_run_step_status import AppInstallActionWorkflowRunStepStatus +from .app_install_approval_option import AppInstallApprovalOption +from .app_install_audit_log import AppInstallAuditLog +from .app_install_component import AppInstallComponent +from .app_install_component_links import AppInstallComponentLinks +from .app_install_component_statuses import AppInstallComponentStatuses +from .app_install_component_summary import AppInstallComponentSummary +from .app_install_config import AppInstallConfig +from .app_install_deploy import AppInstallDeploy +from .app_install_deploy_outputs import AppInstallDeployOutputs +from .app_install_deploy_status import AppInstallDeployStatus +from .app_install_deploy_type import AppInstallDeployType +from .app_install_event import AppInstallEvent +from .app_install_event_payload import AppInstallEventPayload +from .app_install_inputs import AppInstallInputs +from .app_install_inputs_redacted_values import AppInstallInputsRedactedValues +from .app_install_inputs_values import AppInstallInputsValues +from .app_install_links import AppInstallLinks +from .app_install_metadata import AppInstallMetadata +from .app_install_sandbox import AppInstallSandbox +from .app_install_sandbox_run import AppInstallSandboxRun +from .app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs +from .app_install_stack import AppInstallStack +from .app_install_stack_outputs import AppInstallStackOutputs +from .app_install_stack_outputs_data import AppInstallStackOutputsData +from .app_install_stack_outputs_data_contents import AppInstallStackOutputsDataContents +from .app_install_stack_version import AppInstallStackVersion +from .app_install_stack_version_run import AppInstallStackVersionRun +from .app_install_stack_version_run_data import AppInstallStackVersionRunData +from .app_install_stack_version_run_data_contents import AppInstallStackVersionRunDataContents +from .app_install_state import AppInstallState +from .app_installer import AppInstaller +from .app_installer_metadata import AppInstallerMetadata +from .app_installer_type import AppInstallerType +from .app_job_component_config import AppJobComponentConfig +from .app_job_component_config_env_vars import AppJobComponentConfigEnvVars +from .app_json_map import AppJSONMap +from .app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig +from .app_latest_runner_heart_beat import AppLatestRunnerHeartBeat +from .app_log_stream import AppLogStream +from .app_log_stream_attrs import AppLogStreamAttrs +from .app_notifications_config import AppNotificationsConfig +from .app_oci_artifact import AppOCIArtifact +from .app_oci_artifact_annotations import AppOCIArtifactAnnotations +from .app_operation_status import AppOperationStatus +from .app_org import AppOrg +from .app_org_invite import AppOrgInvite +from .app_org_invite_status import AppOrgInviteStatus +from .app_org_links import AppOrgLinks +from .app_otel_log_record import AppOtelLogRecord +from .app_otel_log_record_log_attributes import AppOtelLogRecordLogAttributes +from .app_otel_log_record_resource_attributes import AppOtelLogRecordResourceAttributes +from .app_otel_log_record_scope_attributes import AppOtelLogRecordScopeAttributes +from .app_policy import AppPolicy +from .app_policy_name import AppPolicyName +from .app_policy_permissions import AppPolicyPermissions +from .app_public_git_vcs_config import AppPublicGitVCSConfig +from .app_role import AppRole +from .app_role_type import AppRoleType +from .app_runner import AppRunner +from .app_runner_group import AppRunnerGroup +from .app_runner_group_settings import AppRunnerGroupSettings +from .app_runner_group_settings_aws_tags import AppRunnerGroupSettingsAwsTags +from .app_runner_group_settings_metadata import AppRunnerGroupSettingsMetadata +from .app_runner_group_type import AppRunnerGroupType +from .app_runner_health_check import AppRunnerHealthCheck +from .app_runner_heart_beat import AppRunnerHeartBeat +from .app_runner_job import AppRunnerJob +from .app_runner_job_execution import AppRunnerJobExecution +from .app_runner_job_execution_outputs import AppRunnerJobExecutionOutputs +from .app_runner_job_execution_outputs_outputs import AppRunnerJobExecutionOutputsOutputs +from .app_runner_job_execution_outputs_outputs_additional_property import ( + AppRunnerJobExecutionOutputsOutputsAdditionalProperty, +) +from .app_runner_job_execution_result import AppRunnerJobExecutionResult +from .app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata +from .app_runner_job_execution_status import AppRunnerJobExecutionStatus +from .app_runner_job_group import AppRunnerJobGroup +from .app_runner_job_metadata import AppRunnerJobMetadata +from .app_runner_job_operation_type import AppRunnerJobOperationType +from .app_runner_job_outputs import AppRunnerJobOutputs +from .app_runner_job_status import AppRunnerJobStatus +from .app_runner_job_type import AppRunnerJobType +from .app_runner_operation import AppRunnerOperation +from .app_runner_operation_type import AppRunnerOperationType +from .app_runner_status import AppRunnerStatus +from .app_sandbox_run_type import AppSandboxRunType +from .app_stack_type import AppStackType +from .app_status import AppStatus +from .app_step_error_behavior import AppStepErrorBehavior +from .app_terraform_lock import AppTerraformLock +from .app_terraform_module_component_config import AppTerraformModuleComponentConfig +from .app_terraform_module_component_config_env_vars import AppTerraformModuleComponentConfigEnvVars +from .app_terraform_module_component_config_variables import AppTerraformModuleComponentConfigVariables +from .app_terraform_state_instance import AppTerraformStateInstance +from .app_terraform_state_instance_attributes import AppTerraformStateInstanceAttributes +from .app_terraform_state_resource import AppTerraformStateResource +from .app_terraform_workspace import AppTerraformWorkspace +from .app_terraform_workspace_lock import AppTerraformWorkspaceLock +from .app_terraform_workspace_state import AppTerraformWorkspaceState +from .app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON +from .app_user_journey import AppUserJourney +from .app_user_journey_step import AppUserJourneyStep +from .app_user_journey_step_metadata import AppUserJourneyStepMetadata +from .app_vcs_connection import AppVCSConnection +from .app_vcs_connection_commit import AppVCSConnectionCommit +from .app_waitlist import AppWaitlist +from .app_workflow import AppWorkflow +from .app_workflow_links import AppWorkflowLinks +from .app_workflow_metadata import AppWorkflowMetadata +from .app_workflow_step import AppWorkflowStep +from .app_workflow_step_approval import AppWorkflowStepApproval +from .app_workflow_step_approval_response import AppWorkflowStepApprovalResponse +from .app_workflow_step_approval_type import AppWorkflowStepApprovalType +from .app_workflow_step_execution_type import AppWorkflowStepExecutionType +from .app_workflow_step_links import AppWorkflowStepLinks +from .app_workflow_step_metadata import AppWorkflowStepMetadata +from .app_workflow_step_policy_validation import AppWorkflowStepPolicyValidation +from .app_workflow_step_response_type import AppWorkflowStepResponseType +from .app_workflow_type import AppWorkflowType +from .config_app_policy_type import ConfigAppPolicyType +from .configs_oci_registry_auth import ConfigsOCIRegistryAuth +from .configs_oci_registry_repository import ConfigsOCIRegistryRepository +from .configs_oci_registry_type import ConfigsOCIRegistryType +from .credentials_assume_role_config import CredentialsAssumeRoleConfig +from .credentials_service_principal_credentials import CredentialsServicePrincipalCredentials +from .credentials_static_credentials import CredentialsStaticCredentials +from .generics_null_time import GenericsNullTime +from .get_app_config_template_type import GetAppConfigTemplateType +from .get_config_schema_response_200 import GetConfigSchemaResponse200 +from .get_install_component_outputs_response_200 import GetInstallComponentOutputsResponse200 +from .get_terraform_workspace_state_json_resources_response_200 import ( + GetTerraformWorkspaceStateJSONResourcesResponse200, +) +from .get_terraform_workspace_state_json_resources_v2_response_200 import ( + GetTerraformWorkspaceStateJSONResourcesV2Response200, +) +from .get_terraform_workspace_states_json_by_id_response_200 import GetTerraformWorkspaceStatesJSONByIDResponse200 +from .get_terraform_workspace_states_json_by_idv2_response_200 import GetTerraformWorkspaceStatesJSONByIDV2Response200 +from .get_workflow_step_approval_contents_response_200 import GetWorkflowStepApprovalContentsResponse200 +from .github_com_powertoolsdev_mono_pkg_aws_credentials_config import GithubComPowertoolsdevMonoPkgAwsCredentialsConfig +from .github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, +) +from .github_com_powertoolsdev_mono_pkg_types_state_state import GithubComPowertoolsdevMonoPkgTypesStateState +from .github_com_powertoolsdev_mono_pkg_types_state_state_components import ( + GithubComPowertoolsdevMonoPkgTypesStateStateComponents, +) +from .helpers_create_install_config_params import HelpersCreateInstallConfigParams +from .helpers_install_metadata import HelpersInstallMetadata +from .iam_static_credentials import IamStaticCredentials +from .iam_two_step_config import IamTwoStepConfig +from .kube_cluster_info import KubeClusterInfo +from .kube_cluster_info_env_vars import KubeClusterInfoEnvVars +from .lock_terraform_workspace_body import LockTerraformWorkspaceBody +from .outputs_secret_sync_output import OutputsSecretSyncOutput +from .permissions_permission import PermissionsPermission +from .permissions_set import PermissionsSet +from .plantypes_action_workflow_run_plan import PlantypesActionWorkflowRunPlan +from .plantypes_action_workflow_run_plan_attrs import PlantypesActionWorkflowRunPlanAttrs +from .plantypes_action_workflow_run_plan_builtin_env_vars import PlantypesActionWorkflowRunPlanBuiltinEnvVars +from .plantypes_action_workflow_run_plan_override_env_vars import PlantypesActionWorkflowRunPlanOverrideEnvVars +from .plantypes_action_workflow_run_step_plan import PlantypesActionWorkflowRunStepPlan +from .plantypes_action_workflow_run_step_plan_attrs import PlantypesActionWorkflowRunStepPlanAttrs +from .plantypes_action_workflow_run_step_plan_interpolated_env_vars import ( + PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars, +) +from .plantypes_build_plan import PlantypesBuildPlan +from .plantypes_composite_plan import PlantypesCompositePlan +from .plantypes_container_image_pull_plan import PlantypesContainerImagePullPlan +from .plantypes_deploy_plan import PlantypesDeployPlan +from .plantypes_docker_build_plan import PlantypesDockerBuildPlan +from .plantypes_docker_build_plan_build_args import PlantypesDockerBuildPlanBuildArgs +from .plantypes_git_source import PlantypesGitSource +from .plantypes_helm_build_plan import PlantypesHelmBuildPlan +from .plantypes_helm_build_plan_labels import PlantypesHelmBuildPlanLabels +from .plantypes_helm_deploy_plan import PlantypesHelmDeployPlan +from .plantypes_helm_sandbox_mode import PlantypesHelmSandboxMode +from .plantypes_helm_value import PlantypesHelmValue +from .plantypes_kubernetes_manifest_deploy_plan import PlantypesKubernetesManifestDeployPlan +from .plantypes_kubernetes_sandbox_mode import PlantypesKubernetesSandboxMode +from .plantypes_kubernetes_secret_sync import PlantypesKubernetesSecretSync +from .plantypes_noop_deploy_plan import PlantypesNoopDeployPlan +from .plantypes_sandbox_mode import PlantypesSandboxMode +from .plantypes_sandbox_mode_outputs import PlantypesSandboxModeOutputs +from .plantypes_sandbox_run_plan import PlantypesSandboxRunPlan +from .plantypes_sandbox_run_plan_env_vars import PlantypesSandboxRunPlanEnvVars +from .plantypes_sandbox_run_plan_policies import PlantypesSandboxRunPlanPolicies +from .plantypes_sandbox_run_plan_vars import PlantypesSandboxRunPlanVars +from .plantypes_sync_oci_plan import PlantypesSyncOCIPlan +from .plantypes_sync_secrets_plan import PlantypesSyncSecretsPlan +from .plantypes_terraform_backend import PlantypesTerraformBackend +from .plantypes_terraform_build_plan import PlantypesTerraformBuildPlan +from .plantypes_terraform_build_plan_labels import PlantypesTerraformBuildPlanLabels +from .plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks +from .plantypes_terraform_deploy_hooks_env_vars import PlantypesTerraformDeployHooksEnvVars +from .plantypes_terraform_deploy_plan import PlantypesTerraformDeployPlan +from .plantypes_terraform_deploy_plan_env_vars import PlantypesTerraformDeployPlanEnvVars +from .plantypes_terraform_deploy_plan_policies import PlantypesTerraformDeployPlanPolicies +from .plantypes_terraform_deploy_plan_vars import PlantypesTerraformDeployPlanVars +from .plantypes_terraform_local_archive import PlantypesTerraformLocalArchive +from .plantypes_terraform_sandbox_mode import PlantypesTerraformSandboxMode +from .refs_ref import RefsRef +from .refs_ref_type import RefsRefType +from .service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig +from .service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig +from .service_app_config_template import ServiceAppConfigTemplate +from .service_app_config_template_type import ServiceAppConfigTemplateType +from .service_app_group_request import ServiceAppGroupRequest +from .service_app_input_request import ServiceAppInputRequest +from .service_app_policy_config import ServiceAppPolicyConfig +from .service_app_secret_config import ServiceAppSecretConfig +from .service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest +from .service_build_all_components_request import ServiceBuildAllComponentsRequest +from .service_cancel_runner_job_request import ServiceCancelRunnerJobRequest +from .service_cli_config import ServiceCLIConfig +from .service_component_children import ServiceComponentChildren +from .service_connected_github_vcs_action_workflow_config_request import ( + ServiceConnectedGithubVCSActionWorkflowConfigRequest, +) +from .service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest +from .service_connected_github_vcs_sandbox_config_request import ServiceConnectedGithubVCSSandboxConfigRequest +from .service_create_action_workflow_config_request import ServiceCreateActionWorkflowConfigRequest +from .service_create_action_workflow_config_step_request import ServiceCreateActionWorkflowConfigStepRequest +from .service_create_action_workflow_config_step_request_env_vars import ( + ServiceCreateActionWorkflowConfigStepRequestEnvVars, +) +from .service_create_action_workflow_config_trigger_request import ServiceCreateActionWorkflowConfigTriggerRequest +from .service_create_app_action_request import ServiceCreateAppActionRequest +from .service_create_app_action_workflow_request import ServiceCreateAppActionWorkflowRequest +from .service_create_app_branch_request import ServiceCreateAppBranchRequest +from .service_create_app_break_glass_config_request import ServiceCreateAppBreakGlassConfigRequest +from .service_create_app_config_request import ServiceCreateAppConfigRequest +from .service_create_app_input_config_request import ServiceCreateAppInputConfigRequest +from .service_create_app_input_config_request_groups import ServiceCreateAppInputConfigRequestGroups +from .service_create_app_input_config_request_inputs import ServiceCreateAppInputConfigRequestInputs +from .service_create_app_permissions_config_request import ServiceCreateAppPermissionsConfigRequest +from .service_create_app_policies_config_request import ServiceCreateAppPoliciesConfigRequest +from .service_create_app_request import ServiceCreateAppRequest +from .service_create_app_runner_config_request import ServiceCreateAppRunnerConfigRequest +from .service_create_app_runner_config_request_env_vars import ServiceCreateAppRunnerConfigRequestEnvVars +from .service_create_app_sandbox_config_request import ServiceCreateAppSandboxConfigRequest +from .service_create_app_sandbox_config_request_env_vars import ServiceCreateAppSandboxConfigRequestEnvVars +from .service_create_app_sandbox_config_request_variables import ServiceCreateAppSandboxConfigRequestVariables +from .service_create_app_secret_request import ServiceCreateAppSecretRequest +from .service_create_app_secrets_config_request import ServiceCreateAppSecretsConfigRequest +from .service_create_app_stack_config_request import ServiceCreateAppStackConfigRequest +from .service_create_component_build_request import ServiceCreateComponentBuildRequest +from .service_create_component_release_request import ServiceCreateComponentReleaseRequest +from .service_create_component_release_request_strategy import ServiceCreateComponentReleaseRequestStrategy +from .service_create_component_request import ServiceCreateComponentRequest +from .service_create_connection_callback_request import ServiceCreateConnectionCallbackRequest +from .service_create_connection_request import ServiceCreateConnectionRequest +from .service_create_docker_build_component_config_request import ServiceCreateDockerBuildComponentConfigRequest +from .service_create_docker_build_component_config_request_env_vars import ( + ServiceCreateDockerBuildComponentConfigRequestEnvVars, +) +from .service_create_external_image_component_config_request import ServiceCreateExternalImageComponentConfigRequest +from .service_create_helm_component_config_request import ServiceCreateHelmComponentConfigRequest +from .service_create_helm_component_config_request_values import ServiceCreateHelmComponentConfigRequestValues +from .service_create_install_action_workflow_run_request import ServiceCreateInstallActionWorkflowRunRequest +from .service_create_install_action_workflow_run_request_run_env_vars import ( + ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, +) +from .service_create_install_component_deploy_request import ServiceCreateInstallComponentDeployRequest +from .service_create_install_config_request import ServiceCreateInstallConfigRequest +from .service_create_install_deploy_request import ServiceCreateInstallDeployRequest +from .service_create_install_inputs_request import ServiceCreateInstallInputsRequest +from .service_create_install_inputs_request_inputs import ServiceCreateInstallInputsRequestInputs +from .service_create_install_request import ServiceCreateInstallRequest +from .service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount +from .service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount +from .service_create_install_request_inputs import ServiceCreateInstallRequestInputs +from .service_create_installer_request import ServiceCreateInstallerRequest +from .service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata +from .service_create_job_component_config_request import ServiceCreateJobComponentConfigRequest +from .service_create_job_component_config_request_env_vars import ServiceCreateJobComponentConfigRequestEnvVars +from .service_create_kubernetes_manifest_component_config_request import ( + ServiceCreateKubernetesManifestComponentConfigRequest, +) +from .service_create_org_invite_request import ServiceCreateOrgInviteRequest +from .service_create_org_request import ServiceCreateOrgRequest +from .service_create_org_user_request import ServiceCreateOrgUserRequest +from .service_create_terraform_module_component_config_request import ServiceCreateTerraformModuleComponentConfigRequest +from .service_create_terraform_module_component_config_request_env_vars import ( + ServiceCreateTerraformModuleComponentConfigRequestEnvVars, +) +from .service_create_terraform_module_component_config_request_variables import ( + ServiceCreateTerraformModuleComponentConfigRequestVariables, +) +from .service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest +from .service_create_user_journey_request import ServiceCreateUserJourneyRequest +from .service_create_user_journey_step_req import ServiceCreateUserJourneyStepReq +from .service_create_workflow_step_approval_response_request import ServiceCreateWorkflowStepApprovalResponseRequest +from .service_create_workflow_step_approval_response_response import ServiceCreateWorkflowStepApprovalResponseResponse +from .service_deploy_install_components_request import ServiceDeployInstallComponentsRequest +from .service_deprovision_install_request import ServiceDeprovisionInstallRequest +from .service_deprovision_install_sandbox_request import ServiceDeprovisionInstallSandboxRequest +from .service_force_shutdown_request import ServiceForceShutdownRequest +from .service_forget_install_request import ServiceForgetInstallRequest +from .service_graceful_shutdown_request import ServiceGracefulShutdownRequest +from .service_install_phone_home_request import ServiceInstallPhoneHomeRequest +from .service_latest_runner_heart_beats import ServiceLatestRunnerHeartBeats +from .service_mng_shut_down_request import ServiceMngShutDownRequest +from .service_mng_update_request import ServiceMngUpdateRequest +from .service_mng_vm_shut_down_request import ServiceMngVMShutDownRequest +from .service_patch_install_config_params import ServicePatchInstallConfigParams +from .service_public_git_vcs_action_workflow_config_request import ServicePublicGitVCSActionWorkflowConfigRequest +from .service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest +from .service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest +from .service_readme import ServiceReadme +from .service_remove_org_user_request import ServiceRemoveOrgUserRequest +from .service_rendered_installer import ServiceRenderedInstaller +from .service_reprovision_install_request import ServiceReprovisionInstallRequest +from .service_reprovision_install_sandbox_request import ServiceReprovisionInstallSandboxRequest +from .service_retry_workflow_by_id_request import ServiceRetryWorkflowByIDRequest +from .service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse +from .service_retry_workflow_request import ServiceRetryWorkflowRequest +from .service_retry_workflow_response import ServiceRetryWorkflowResponse +from .service_retry_workflow_step_response import ServiceRetryWorkflowStepResponse +from .service_runner_connection_status import ServiceRunnerConnectionStatus +from .service_sync_secrets_request import ServiceSyncSecretsRequest +from .service_teardown_install_component_request import ServiceTeardownInstallComponentRequest +from .service_teardown_install_components_request import ServiceTeardownInstallComponentsRequest +from .service_update_action_workflow_request import ServiceUpdateActionWorkflowRequest +from .service_update_app_config_installs_request import ServiceUpdateAppConfigInstallsRequest +from .service_update_app_config_request import ServiceUpdateAppConfigRequest +from .service_update_app_request import ServiceUpdateAppRequest +from .service_update_component_request import ServiceUpdateComponentRequest +from .service_update_install_config_request import ServiceUpdateInstallConfigRequest +from .service_update_install_inputs_request import ServiceUpdateInstallInputsRequest +from .service_update_install_inputs_request_inputs import ServiceUpdateInstallInputsRequestInputs +from .service_update_install_request import ServiceUpdateInstallRequest +from .service_update_installer_request import ServiceUpdateInstallerRequest +from .service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata +from .service_update_org_request import ServiceUpdateOrgRequest +from .service_update_runner_settings_request import ServiceUpdateRunnerSettingsRequest +from .service_update_user_journey_step_request import ServiceUpdateUserJourneyStepRequest +from .service_update_workflow_request import ServiceUpdateWorkflowRequest +from .service_waitlist_request import ServiceWaitlistRequest +from .state_action_workflow_state import StateActionWorkflowState +from .state_action_workflow_state_outputs import StateActionWorkflowStateOutputs +from .state_actions_state import StateActionsState +from .state_actions_state_workflows import StateActionsStateWorkflows +from .state_app_state import StateAppState +from .state_app_state_variables import StateAppStateVariables +from .state_aws_cloud_account import StateAWSCloudAccount +from .state_azure_cloud_account import StateAzureCloudAccount +from .state_cloud_account import StateCloudAccount +from .state_domain_state import StateDomainState +from .state_inputs_state import StateInputsState +from .state_inputs_state_inputs import StateInputsStateInputs +from .state_install_stack_state import StateInstallStackState +from .state_install_stack_state_outputs import StateInstallStackStateOutputs +from .state_install_state import StateInstallState +from .state_install_state_inputs import StateInstallStateInputs +from .state_org_state import StateOrgState +from .state_runner_state import StateRunnerState +from .state_sandbox_state import StateSandboxState +from .state_sandbox_state_outputs import StateSandboxStateOutputs +from .state_secrets_state import StateSecretsState +from .stderr_err_response import StderrErrResponse +from .types_string_bool_map import TypesStringBoolMap +from .unlock_terraform_workspace_body import UnlockTerraformWorkspaceBody +from .update_terraform_state_body import UpdateTerraformStateBody + +__all__ = ( + "AppAccount", + "AppAccountType", + "AppActionWorkflow", + "AppActionWorkflowConfig", + "AppActionWorkflowStepConfig", + "AppActionWorkflowStepConfigEnvVars", + "AppActionWorkflowTriggerConfig", + "AppActionWorkflowTriggerType", + "AppApp", + "AppAppAWSIAMPolicyConfig", + "AppAppAWSIAMRoleConfig", + "AppAppBranch", + "AppAppBreakGlassConfig", + "AppAppConfig", + "AppAppConfigStatus", + "AppAppConfigVersion", + "AppAppInput", + "AppAppInputConfig", + "AppAppInputGroup", + "AppAppLinks", + "AppAppPermissionsConfig", + "AppAppPoliciesConfig", + "AppAppRunnerConfig", + "AppAppRunnerConfigEnvVars", + "AppAppRunnerConfigHelmDriverType", + "AppAppRunnerType", + "AppAppSandboxConfig", + "AppAppSandboxConfigEnvVars", + "AppAppSandboxConfigVariables", + "AppAppSecret", + "AppAppSecretConfig", + "AppAppSecretsConfig", + "AppAppStackConfig", + "AppAWSAccount", + "AppAWSECRImageConfig", + "AppAWSIAMRoleType", + "AppAWSStackOutputs", + "AppAWSStackOutputsBreakGlassRoleArns", + "AppAzureAccount", + "AppAzureStackOutputs", + "AppCloudPlatform", + "AppCloudPlatformRegion", + "AppComponent", + "AppComponentBuild", + "AppComponentBuildStatus", + "AppComponentConfigConnection", + "AppComponentLinks", + "AppComponentRelease", + "AppComponentReleaseStep", + "AppComponentType", + "AppCompositeStatus", + "AppCompositeStatusMetadata", + "AppConnectedGithubVCSConfig", + "AppDockerBuildComponentConfig", + "AppDockerBuildComponentConfigEnvVars", + "AppDriftedObject", + "AppExternalImageComponentConfig", + "AppHelmChart", + "AppHelmComponentConfig", + "AppHelmComponentConfigValues", + "AppHelmConfig", + "AppHelmConfigValues", + "AppHelmRelease", + "AppInstall", + "AppInstallActionWorkflow", + "AppInstallActionWorkflowRun", + "AppInstallActionWorkflowRunOutputs", + "AppInstallActionWorkflowRunRunEnvVars", + "AppInstallActionWorkflowRunStep", + "AppInstallActionWorkflowRunStepStatus", + "AppInstallApprovalOption", + "AppInstallAuditLog", + "AppInstallComponent", + "AppInstallComponentLinks", + "AppInstallComponentStatuses", + "AppInstallComponentSummary", + "AppInstallConfig", + "AppInstallDeploy", + "AppInstallDeployOutputs", + "AppInstallDeployStatus", + "AppInstallDeployType", + "AppInstaller", + "AppInstallerMetadata", + "AppInstallerType", + "AppInstallEvent", + "AppInstallEventPayload", + "AppInstallInputs", + "AppInstallInputsRedactedValues", + "AppInstallInputsValues", + "AppInstallLinks", + "AppInstallMetadata", + "AppInstallSandbox", + "AppInstallSandboxRun", + "AppInstallSandboxRunOutputs", + "AppInstallStack", + "AppInstallStackOutputs", + "AppInstallStackOutputsData", + "AppInstallStackOutputsDataContents", + "AppInstallStackVersion", + "AppInstallStackVersionRun", + "AppInstallStackVersionRunData", + "AppInstallStackVersionRunDataContents", + "AppInstallState", + "AppJobComponentConfig", + "AppJobComponentConfigEnvVars", + "AppJSONMap", + "AppKubernetesManifestComponentConfig", + "AppLatestRunnerHeartBeat", + "AppLogStream", + "AppLogStreamAttrs", + "AppNotificationsConfig", + "AppOCIArtifact", + "AppOCIArtifactAnnotations", + "AppOperationStatus", + "AppOrg", + "AppOrgInvite", + "AppOrgInviteStatus", + "AppOrgLinks", + "AppOtelLogRecord", + "AppOtelLogRecordLogAttributes", + "AppOtelLogRecordResourceAttributes", + "AppOtelLogRecordScopeAttributes", + "AppPolicy", + "AppPolicyName", + "AppPolicyPermissions", + "AppPublicGitVCSConfig", + "AppRole", + "AppRoleType", + "AppRunner", + "AppRunnerGroup", + "AppRunnerGroupSettings", + "AppRunnerGroupSettingsAwsTags", + "AppRunnerGroupSettingsMetadata", + "AppRunnerGroupType", + "AppRunnerHealthCheck", + "AppRunnerHeartBeat", + "AppRunnerJob", + "AppRunnerJobExecution", + "AppRunnerJobExecutionOutputs", + "AppRunnerJobExecutionOutputsOutputs", + "AppRunnerJobExecutionOutputsOutputsAdditionalProperty", + "AppRunnerJobExecutionResult", + "AppRunnerJobExecutionResultErrorMetadata", + "AppRunnerJobExecutionStatus", + "AppRunnerJobGroup", + "AppRunnerJobMetadata", + "AppRunnerJobOperationType", + "AppRunnerJobOutputs", + "AppRunnerJobStatus", + "AppRunnerJobType", + "AppRunnerOperation", + "AppRunnerOperationType", + "AppRunnerStatus", + "AppSandboxRunType", + "AppStackType", + "AppStatus", + "AppStepErrorBehavior", + "AppTerraformLock", + "AppTerraformModuleComponentConfig", + "AppTerraformModuleComponentConfigEnvVars", + "AppTerraformModuleComponentConfigVariables", + "AppTerraformStateInstance", + "AppTerraformStateInstanceAttributes", + "AppTerraformStateResource", + "AppTerraformWorkspace", + "AppTerraformWorkspaceLock", + "AppTerraformWorkspaceState", + "AppTerraformWorkspaceStateJSON", + "AppUserJourney", + "AppUserJourneyStep", + "AppUserJourneyStepMetadata", + "AppVCSConnection", + "AppVCSConnectionCommit", + "AppWaitlist", + "AppWorkflow", + "AppWorkflowLinks", + "AppWorkflowMetadata", + "AppWorkflowStep", + "AppWorkflowStepApproval", + "AppWorkflowStepApprovalResponse", + "AppWorkflowStepApprovalType", + "AppWorkflowStepExecutionType", + "AppWorkflowStepLinks", + "AppWorkflowStepMetadata", + "AppWorkflowStepPolicyValidation", + "AppWorkflowStepResponseType", + "AppWorkflowType", + "ConfigAppPolicyType", + "ConfigsOCIRegistryAuth", + "ConfigsOCIRegistryRepository", + "ConfigsOCIRegistryType", + "CredentialsAssumeRoleConfig", + "CredentialsServicePrincipalCredentials", + "CredentialsStaticCredentials", + "GenericsNullTime", + "GetAppConfigTemplateType", + "GetConfigSchemaResponse200", + "GetInstallComponentOutputsResponse200", + "GetTerraformWorkspaceStateJSONResourcesResponse200", + "GetTerraformWorkspaceStateJSONResourcesV2Response200", + "GetTerraformWorkspaceStatesJSONByIDResponse200", + "GetTerraformWorkspaceStatesJSONByIDV2Response200", + "GetWorkflowStepApprovalContentsResponse200", + "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig", + "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig", + "GithubComPowertoolsdevMonoPkgTypesStateState", + "GithubComPowertoolsdevMonoPkgTypesStateStateComponents", + "HelpersCreateInstallConfigParams", + "HelpersInstallMetadata", + "IamStaticCredentials", + "IamTwoStepConfig", + "KubeClusterInfo", + "KubeClusterInfoEnvVars", + "LockTerraformWorkspaceBody", + "OutputsSecretSyncOutput", + "PermissionsPermission", + "PermissionsSet", + "PlantypesActionWorkflowRunPlan", + "PlantypesActionWorkflowRunPlanAttrs", + "PlantypesActionWorkflowRunPlanBuiltinEnvVars", + "PlantypesActionWorkflowRunPlanOverrideEnvVars", + "PlantypesActionWorkflowRunStepPlan", + "PlantypesActionWorkflowRunStepPlanAttrs", + "PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars", + "PlantypesBuildPlan", + "PlantypesCompositePlan", + "PlantypesContainerImagePullPlan", + "PlantypesDeployPlan", + "PlantypesDockerBuildPlan", + "PlantypesDockerBuildPlanBuildArgs", + "PlantypesGitSource", + "PlantypesHelmBuildPlan", + "PlantypesHelmBuildPlanLabels", + "PlantypesHelmDeployPlan", + "PlantypesHelmSandboxMode", + "PlantypesHelmValue", + "PlantypesKubernetesManifestDeployPlan", + "PlantypesKubernetesSandboxMode", + "PlantypesKubernetesSecretSync", + "PlantypesNoopDeployPlan", + "PlantypesSandboxMode", + "PlantypesSandboxModeOutputs", + "PlantypesSandboxRunPlan", + "PlantypesSandboxRunPlanEnvVars", + "PlantypesSandboxRunPlanPolicies", + "PlantypesSandboxRunPlanVars", + "PlantypesSyncOCIPlan", + "PlantypesSyncSecretsPlan", + "PlantypesTerraformBackend", + "PlantypesTerraformBuildPlan", + "PlantypesTerraformBuildPlanLabels", + "PlantypesTerraformDeployHooks", + "PlantypesTerraformDeployHooksEnvVars", + "PlantypesTerraformDeployPlan", + "PlantypesTerraformDeployPlanEnvVars", + "PlantypesTerraformDeployPlanPolicies", + "PlantypesTerraformDeployPlanVars", + "PlantypesTerraformLocalArchive", + "PlantypesTerraformSandboxMode", + "RefsRef", + "RefsRefType", + "ServiceAppAWSIAMPolicyConfig", + "ServiceAppAWSIAMRoleConfig", + "ServiceAppConfigTemplate", + "ServiceAppConfigTemplateType", + "ServiceAppGroupRequest", + "ServiceAppInputRequest", + "ServiceAppPolicyConfig", + "ServiceAppSecretConfig", + "ServiceAwsECRImageConfigRequest", + "ServiceBuildAllComponentsRequest", + "ServiceCancelRunnerJobRequest", + "ServiceCLIConfig", + "ServiceComponentChildren", + "ServiceConnectedGithubVCSActionWorkflowConfigRequest", + "ServiceConnectedGithubVCSConfigRequest", + "ServiceConnectedGithubVCSSandboxConfigRequest", + "ServiceCreateActionWorkflowConfigRequest", + "ServiceCreateActionWorkflowConfigStepRequest", + "ServiceCreateActionWorkflowConfigStepRequestEnvVars", + "ServiceCreateActionWorkflowConfigTriggerRequest", + "ServiceCreateAppActionRequest", + "ServiceCreateAppActionWorkflowRequest", + "ServiceCreateAppBranchRequest", + "ServiceCreateAppBreakGlassConfigRequest", + "ServiceCreateAppConfigRequest", + "ServiceCreateAppInputConfigRequest", + "ServiceCreateAppInputConfigRequestGroups", + "ServiceCreateAppInputConfigRequestInputs", + "ServiceCreateAppPermissionsConfigRequest", + "ServiceCreateAppPoliciesConfigRequest", + "ServiceCreateAppRequest", + "ServiceCreateAppRunnerConfigRequest", + "ServiceCreateAppRunnerConfigRequestEnvVars", + "ServiceCreateAppSandboxConfigRequest", + "ServiceCreateAppSandboxConfigRequestEnvVars", + "ServiceCreateAppSandboxConfigRequestVariables", + "ServiceCreateAppSecretRequest", + "ServiceCreateAppSecretsConfigRequest", + "ServiceCreateAppStackConfigRequest", + "ServiceCreateComponentBuildRequest", + "ServiceCreateComponentReleaseRequest", + "ServiceCreateComponentReleaseRequestStrategy", + "ServiceCreateComponentRequest", + "ServiceCreateConnectionCallbackRequest", + "ServiceCreateConnectionRequest", + "ServiceCreateDockerBuildComponentConfigRequest", + "ServiceCreateDockerBuildComponentConfigRequestEnvVars", + "ServiceCreateExternalImageComponentConfigRequest", + "ServiceCreateHelmComponentConfigRequest", + "ServiceCreateHelmComponentConfigRequestValues", + "ServiceCreateInstallActionWorkflowRunRequest", + "ServiceCreateInstallActionWorkflowRunRequestRunEnvVars", + "ServiceCreateInstallComponentDeployRequest", + "ServiceCreateInstallConfigRequest", + "ServiceCreateInstallDeployRequest", + "ServiceCreateInstallerRequest", + "ServiceCreateInstallerRequestMetadata", + "ServiceCreateInstallInputsRequest", + "ServiceCreateInstallInputsRequestInputs", + "ServiceCreateInstallRequest", + "ServiceCreateInstallRequestAwsAccount", + "ServiceCreateInstallRequestAzureAccount", + "ServiceCreateInstallRequestInputs", + "ServiceCreateJobComponentConfigRequest", + "ServiceCreateJobComponentConfigRequestEnvVars", + "ServiceCreateKubernetesManifestComponentConfigRequest", + "ServiceCreateOrgInviteRequest", + "ServiceCreateOrgRequest", + "ServiceCreateOrgUserRequest", + "ServiceCreateTerraformModuleComponentConfigRequest", + "ServiceCreateTerraformModuleComponentConfigRequestEnvVars", + "ServiceCreateTerraformModuleComponentConfigRequestVariables", + "ServiceCreateTerraformWorkspaceRequest", + "ServiceCreateUserJourneyRequest", + "ServiceCreateUserJourneyStepReq", + "ServiceCreateWorkflowStepApprovalResponseRequest", + "ServiceCreateWorkflowStepApprovalResponseResponse", + "ServiceDeployInstallComponentsRequest", + "ServiceDeprovisionInstallRequest", + "ServiceDeprovisionInstallSandboxRequest", + "ServiceForceShutdownRequest", + "ServiceForgetInstallRequest", + "ServiceGracefulShutdownRequest", + "ServiceInstallPhoneHomeRequest", + "ServiceLatestRunnerHeartBeats", + "ServiceMngShutDownRequest", + "ServiceMngUpdateRequest", + "ServiceMngVMShutDownRequest", + "ServicePatchInstallConfigParams", + "ServicePublicGitVCSActionWorkflowConfigRequest", + "ServicePublicGitVCSConfigRequest", + "ServicePublicGitVCSSandboxConfigRequest", + "ServiceReadme", + "ServiceRemoveOrgUserRequest", + "ServiceRenderedInstaller", + "ServiceReprovisionInstallRequest", + "ServiceReprovisionInstallSandboxRequest", + "ServiceRetryWorkflowByIDRequest", + "ServiceRetryWorkflowByIDResponse", + "ServiceRetryWorkflowRequest", + "ServiceRetryWorkflowResponse", + "ServiceRetryWorkflowStepResponse", + "ServiceRunnerConnectionStatus", + "ServiceSyncSecretsRequest", + "ServiceTeardownInstallComponentRequest", + "ServiceTeardownInstallComponentsRequest", + "ServiceUpdateActionWorkflowRequest", + "ServiceUpdateAppConfigInstallsRequest", + "ServiceUpdateAppConfigRequest", + "ServiceUpdateAppRequest", + "ServiceUpdateComponentRequest", + "ServiceUpdateInstallConfigRequest", + "ServiceUpdateInstallerRequest", + "ServiceUpdateInstallerRequestMetadata", + "ServiceUpdateInstallInputsRequest", + "ServiceUpdateInstallInputsRequestInputs", + "ServiceUpdateInstallRequest", + "ServiceUpdateOrgRequest", + "ServiceUpdateRunnerSettingsRequest", + "ServiceUpdateUserJourneyStepRequest", + "ServiceUpdateWorkflowRequest", + "ServiceWaitlistRequest", + "StateActionsState", + "StateActionsStateWorkflows", + "StateActionWorkflowState", + "StateActionWorkflowStateOutputs", + "StateAppState", + "StateAppStateVariables", + "StateAWSCloudAccount", + "StateAzureCloudAccount", + "StateCloudAccount", + "StateDomainState", + "StateInputsState", + "StateInputsStateInputs", + "StateInstallStackState", + "StateInstallStackStateOutputs", + "StateInstallState", + "StateInstallStateInputs", + "StateOrgState", + "StateRunnerState", + "StateSandboxState", + "StateSandboxStateOutputs", + "StateSecretsState", + "StderrErrResponse", + "TypesStringBoolMap", + "UnlockTerraformWorkspaceBody", + "UpdateTerraformStateBody", +) diff --git a/nuon/models/app_account.py b/nuon/models/app_account.py new file mode 100644 index 00000000..1ed0c67e --- /dev/null +++ b/nuon/models/app_account.py @@ -0,0 +1,187 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_account_type import AppAccountType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_role import AppRole + from ..models.app_user_journey import AppUserJourney + from ..models.permissions_set import PermissionsSet + + +T = TypeVar("T", bound="AppAccount") + + +@_attrs_define +class AppAccount: + """ + Attributes: + account_type (Union[Unset, AppAccountType]): + created_at (Union[Unset, str]): + email (Union[Unset, str]): + id (Union[Unset, str]): + org_ids (Union[Unset, list[str]]): ReadOnly Fields + permissions (Union[Unset, PermissionsSet]): + roles (Union[Unset, list['AppRole']]): + subject (Union[Unset, str]): + updated_at (Union[Unset, str]): + user_journeys (Union[Unset, list['AppUserJourney']]): + """ + + account_type: Union[Unset, AppAccountType] = UNSET + created_at: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_ids: Union[Unset, list[str]] = UNSET + permissions: Union[Unset, "PermissionsSet"] = UNSET + roles: Union[Unset, list["AppRole"]] = UNSET + subject: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + user_journeys: Union[Unset, list["AppUserJourney"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + account_type: Union[Unset, str] = UNSET + if not isinstance(self.account_type, Unset): + account_type = self.account_type.value + + created_at = self.created_at + + email = self.email + + id = self.id + + org_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.org_ids, Unset): + org_ids = self.org_ids + + permissions: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.permissions, Unset): + permissions = self.permissions.to_dict() + + roles: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.roles, Unset): + roles = [] + for roles_item_data in self.roles: + roles_item = roles_item_data.to_dict() + roles.append(roles_item) + + subject = self.subject + + updated_at = self.updated_at + + user_journeys: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.user_journeys, Unset): + user_journeys = [] + for user_journeys_item_data in self.user_journeys: + user_journeys_item = user_journeys_item_data.to_dict() + user_journeys.append(user_journeys_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if account_type is not UNSET: + field_dict["account_type"] = account_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + if email is not UNSET: + field_dict["email"] = email + if id is not UNSET: + field_dict["id"] = id + if org_ids is not UNSET: + field_dict["org_ids"] = org_ids + if permissions is not UNSET: + field_dict["permissions"] = permissions + if roles is not UNSET: + field_dict["roles"] = roles + if subject is not UNSET: + field_dict["subject"] = subject + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_journeys is not UNSET: + field_dict["user_journeys"] = user_journeys + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_role import AppRole + from ..models.app_user_journey import AppUserJourney + from ..models.permissions_set import PermissionsSet + + d = dict(src_dict) + _account_type = d.pop("account_type", UNSET) + account_type: Union[Unset, AppAccountType] + if isinstance(_account_type, Unset): + account_type = UNSET + else: + account_type = AppAccountType(_account_type) + + created_at = d.pop("created_at", UNSET) + + email = d.pop("email", UNSET) + + id = d.pop("id", UNSET) + + org_ids = cast(list[str], d.pop("org_ids", UNSET)) + + _permissions = d.pop("permissions", UNSET) + permissions: Union[Unset, PermissionsSet] + if isinstance(_permissions, Unset): + permissions = UNSET + else: + permissions = PermissionsSet.from_dict(_permissions) + + roles = [] + _roles = d.pop("roles", UNSET) + for roles_item_data in _roles or []: + roles_item = AppRole.from_dict(roles_item_data) + + roles.append(roles_item) + + subject = d.pop("subject", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + user_journeys = [] + _user_journeys = d.pop("user_journeys", UNSET) + for user_journeys_item_data in _user_journeys or []: + user_journeys_item = AppUserJourney.from_dict(user_journeys_item_data) + + user_journeys.append(user_journeys_item) + + app_account = cls( + account_type=account_type, + created_at=created_at, + email=email, + id=id, + org_ids=org_ids, + permissions=permissions, + roles=roles, + subject=subject, + updated_at=updated_at, + user_journeys=user_journeys, + ) + + app_account.additional_properties = d + return app_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_account_type.py b/nuon/models/app_account_type.py new file mode 100644 index 00000000..f9865241 --- /dev/null +++ b/nuon/models/app_account_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AppAccountType(str, Enum): + AUTH0 = "auth0" + CANARY = "canary" + INTEGRATION = "integration" + SERVICE = "service" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_action_workflow.py b/nuon/models/app_action_workflow.py new file mode 100644 index 00000000..bd2dc6b8 --- /dev/null +++ b/nuon/models/app_action_workflow.py @@ -0,0 +1,156 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_action_workflow_config import AppActionWorkflowConfig + + +T = TypeVar("T", bound="AppActionWorkflow") + + +@_attrs_define +class AppActionWorkflow: + """ + Attributes: + app_id (Union[Unset, str]): + config_count (Union[Unset, int]): + configs (Union[Unset, list['AppActionWorkflowConfig']]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + name (Union[Unset, str]): metadata + status (Union[Unset, str]): TODO: change to default null after migration & after initial pr + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_id: Union[Unset, str] = UNSET + config_count: Union[Unset, int] = UNSET + configs: Union[Unset, list["AppActionWorkflowConfig"]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_id = self.app_id + + config_count = self.config_count + + configs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.configs, Unset): + configs = [] + for configs_item_data in self.configs: + configs_item = configs_item_data.to_dict() + configs.append(configs_item) + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + name = self.name + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_id is not UNSET: + field_dict["app_id"] = app_id + if config_count is not UNSET: + field_dict["config_count"] = config_count + if configs is not UNSET: + field_dict["configs"] = configs + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_action_workflow_config import AppActionWorkflowConfig + + d = dict(src_dict) + app_id = d.pop("app_id", UNSET) + + config_count = d.pop("config_count", UNSET) + + configs = [] + _configs = d.pop("configs", UNSET) + for configs_item_data in _configs or []: + configs_item = AppActionWorkflowConfig.from_dict(configs_item_data) + + configs.append(configs_item) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_action_workflow = cls( + app_id=app_id, + config_count=config_count, + configs=configs, + created_at=created_at, + created_by_id=created_by_id, + id=id, + name=name, + status=status, + status_description=status_description, + updated_at=updated_at, + ) + + app_action_workflow.additional_properties = d + return app_action_workflow + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_config.py b/nuon/models/app_action_workflow_config.py new file mode 100644 index 00000000..7a3bf90e --- /dev/null +++ b/nuon/models/app_action_workflow_config.py @@ -0,0 +1,221 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_action_workflow_step_config import AppActionWorkflowStepConfig + from ..models.app_action_workflow_trigger_config import AppActionWorkflowTriggerConfig + from ..models.refs_ref import RefsRef + + +T = TypeVar("T", bound="AppActionWorkflowConfig") + + +@_attrs_define +class AppActionWorkflowConfig: + """ + Attributes: + action_workflow_id (Union[Unset, str]): + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + break_glass_role_arn (Union[Unset, str]): + component_dependency_ids (Union[Unset, list[str]]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + references (Union[Unset, list[str]]): + refs (Union[Unset, list['RefsRef']]): + steps (Union[Unset, list['AppActionWorkflowStepConfig']]): + timeout (Union[Unset, int]): + triggers (Union[Unset, list['AppActionWorkflowTriggerConfig']]): INFO: if adding new associations here, ensure + they are added to the batch delete activity + updated_at (Union[Unset, str]): + """ + + action_workflow_id: Union[Unset, str] = UNSET + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + break_glass_role_arn: Union[Unset, str] = UNSET + component_dependency_ids: Union[Unset, list[str]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + references: Union[Unset, list[str]] = UNSET + refs: Union[Unset, list["RefsRef"]] = UNSET + steps: Union[Unset, list["AppActionWorkflowStepConfig"]] = UNSET + timeout: Union[Unset, int] = UNSET + triggers: Union[Unset, list["AppActionWorkflowTriggerConfig"]] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_id = self.action_workflow_id + + app_config_id = self.app_config_id + + app_id = self.app_id + + break_glass_role_arn = self.break_glass_role_arn + + component_dependency_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.component_dependency_ids, Unset): + component_dependency_ids = self.component_dependency_ids + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + refs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.refs, Unset): + refs = [] + for refs_item_data in self.refs: + refs_item = refs_item_data.to_dict() + refs.append(refs_item) + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + timeout = self.timeout + + triggers: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.triggers, Unset): + triggers = [] + for triggers_item_data in self.triggers: + triggers_item = triggers_item_data.to_dict() + triggers.append(triggers_item) + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_id is not UNSET: + field_dict["action_workflow_id"] = action_workflow_id + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if break_glass_role_arn is not UNSET: + field_dict["break_glass_role_arn"] = break_glass_role_arn + if component_dependency_ids is not UNSET: + field_dict["component_dependency_ids"] = component_dependency_ids + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if references is not UNSET: + field_dict["references"] = references + if refs is not UNSET: + field_dict["refs"] = refs + if steps is not UNSET: + field_dict["steps"] = steps + if timeout is not UNSET: + field_dict["timeout"] = timeout + if triggers is not UNSET: + field_dict["triggers"] = triggers + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_action_workflow_step_config import AppActionWorkflowStepConfig + from ..models.app_action_workflow_trigger_config import AppActionWorkflowTriggerConfig + from ..models.refs_ref import RefsRef + + d = dict(src_dict) + action_workflow_id = d.pop("action_workflow_id", UNSET) + + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + break_glass_role_arn = d.pop("break_glass_role_arn", UNSET) + + component_dependency_ids = cast(list[str], d.pop("component_dependency_ids", UNSET)) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + references = cast(list[str], d.pop("references", UNSET)) + + refs = [] + _refs = d.pop("refs", UNSET) + for refs_item_data in _refs or []: + refs_item = RefsRef.from_dict(refs_item_data) + + refs.append(refs_item) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = AppActionWorkflowStepConfig.from_dict(steps_item_data) + + steps.append(steps_item) + + timeout = d.pop("timeout", UNSET) + + triggers = [] + _triggers = d.pop("triggers", UNSET) + for triggers_item_data in _triggers or []: + triggers_item = AppActionWorkflowTriggerConfig.from_dict(triggers_item_data) + + triggers.append(triggers_item) + + updated_at = d.pop("updated_at", UNSET) + + app_action_workflow_config = cls( + action_workflow_id=action_workflow_id, + app_config_id=app_config_id, + app_id=app_id, + break_glass_role_arn=break_glass_role_arn, + component_dependency_ids=component_dependency_ids, + created_at=created_at, + created_by_id=created_by_id, + id=id, + references=references, + refs=refs, + steps=steps, + timeout=timeout, + triggers=triggers, + updated_at=updated_at, + ) + + app_action_workflow_config.additional_properties = d + return app_action_workflow_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_step_config.py b/nuon/models/app_action_workflow_step_config.py new file mode 100644 index 00000000..1fc2ec3e --- /dev/null +++ b/nuon/models/app_action_workflow_step_config.py @@ -0,0 +1,227 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_action_workflow_step_config_env_vars import AppActionWorkflowStepConfigEnvVars + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + + +T = TypeVar("T", bound="AppActionWorkflowStepConfig") + + +@_attrs_define +class AppActionWorkflowStepConfig: + """ + Attributes: + action_workflow_config_id (Union[Unset, str]): + app_config_id (Union[Unset, str]): this belongs to an app config id + app_id (Union[Unset, str]): + command (Union[Unset, str]): + connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + env_vars (Union[Unset, AppActionWorkflowStepConfigEnvVars]): + id (Union[Unset, str]): + idx (Union[Unset, int]): + inline_contents (Union[Unset, str]): + name (Union[Unset, str]): metadata + previous_step_id (Union[Unset, str]): + public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): + references (Union[Unset, list[str]]): + updated_at (Union[Unset, str]): + """ + + action_workflow_config_id: Union[Unset, str] = UNSET + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + command: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + env_vars: Union[Unset, "AppActionWorkflowStepConfigEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + idx: Union[Unset, int] = UNSET + inline_contents: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + previous_step_id: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET + references: Union[Unset, list[str]] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_config_id = self.action_workflow_config_id + + app_config_id = self.app_config_id + + app_id = self.app_id + + command = self.command + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + idx = self.idx + + inline_contents = self.inline_contents + + name = self.name + + previous_step_id = self.previous_step_id + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_config_id is not UNSET: + field_dict["action_workflow_config_id"] = action_workflow_config_id + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if command is not UNSET: + field_dict["command"] = command + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if idx is not UNSET: + field_dict["idx"] = idx + if inline_contents is not UNSET: + field_dict["inline_contents"] = inline_contents + if name is not UNSET: + field_dict["name"] = name + if previous_step_id is not UNSET: + field_dict["previous_step_id"] = previous_step_id + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_action_workflow_step_config_env_vars import AppActionWorkflowStepConfigEnvVars + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + + d = dict(src_dict) + action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) + + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + command = d.pop("command", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, AppActionWorkflowStepConfigEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = AppActionWorkflowStepConfigEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + idx = d.pop("idx", UNSET) + + inline_contents = d.pop("inline_contents", UNSET) + + name = d.pop("name", UNSET) + + previous_step_id = d.pop("previous_step_id", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + updated_at = d.pop("updated_at", UNSET) + + app_action_workflow_step_config = cls( + action_workflow_config_id=action_workflow_config_id, + app_config_id=app_config_id, + app_id=app_id, + command=command, + connected_github_vcs_config=connected_github_vcs_config, + created_at=created_at, + created_by_id=created_by_id, + env_vars=env_vars, + id=id, + idx=idx, + inline_contents=inline_contents, + name=name, + previous_step_id=previous_step_id, + public_git_vcs_config=public_git_vcs_config, + references=references, + updated_at=updated_at, + ) + + app_action_workflow_step_config.additional_properties = d + return app_action_workflow_step_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_step_config_env_vars.py b/nuon/models/app_action_workflow_step_config_env_vars.py new file mode 100644 index 00000000..c11fba66 --- /dev/null +++ b/nuon/models/app_action_workflow_step_config_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppActionWorkflowStepConfigEnvVars") + + +@_attrs_define +class AppActionWorkflowStepConfigEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_action_workflow_step_config_env_vars = cls() + + app_action_workflow_step_config_env_vars.additional_properties = d + return app_action_workflow_step_config_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_trigger_config.py b/nuon/models/app_action_workflow_trigger_config.py new file mode 100644 index 00000000..12faeda8 --- /dev/null +++ b/nuon/models/app_action_workflow_trigger_config.py @@ -0,0 +1,171 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_component import AppComponent + + +T = TypeVar("T", bound="AppActionWorkflowTriggerConfig") + + +@_attrs_define +class AppActionWorkflowTriggerConfig: + """ + Attributes: + action_workflow_config_id (Union[Unset, str]): + app_config_id (Union[Unset, str]): this belongs to an app config id + app_id (Union[Unset, str]): + component (Union[Unset, AppComponent]): + component_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + cron_schedule (Union[Unset, str]): + id (Union[Unset, str]): + index (Union[Unset, int]): + type_ (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + action_workflow_config_id: Union[Unset, str] = UNSET + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + component: Union[Unset, "AppComponent"] = UNSET + component_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + cron_schedule: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + index: Union[Unset, int] = UNSET + type_: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_config_id = self.action_workflow_config_id + + app_config_id = self.app_config_id + + app_id = self.app_id + + component: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.component, Unset): + component = self.component.to_dict() + + component_id = self.component_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + cron_schedule = self.cron_schedule + + id = self.id + + index = self.index + + type_ = self.type_ + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_config_id is not UNSET: + field_dict["action_workflow_config_id"] = action_workflow_config_id + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if component is not UNSET: + field_dict["component"] = component + if component_id is not UNSET: + field_dict["component_id"] = component_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if cron_schedule is not UNSET: + field_dict["cron_schedule"] = cron_schedule + if id is not UNSET: + field_dict["id"] = id + if index is not UNSET: + field_dict["index"] = index + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_component import AppComponent + + d = dict(src_dict) + action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) + + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + _component = d.pop("component", UNSET) + component: Union[Unset, AppComponent] + if isinstance(_component, Unset): + component = UNSET + else: + component = AppComponent.from_dict(_component) + + component_id = d.pop("component_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + cron_schedule = d.pop("cron_schedule", UNSET) + + id = d.pop("id", UNSET) + + index = d.pop("index", UNSET) + + type_ = d.pop("type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_action_workflow_trigger_config = cls( + action_workflow_config_id=action_workflow_config_id, + app_config_id=app_config_id, + app_id=app_id, + component=component, + component_id=component_id, + created_at=created_at, + created_by_id=created_by_id, + cron_schedule=cron_schedule, + id=id, + index=index, + type_=type_, + updated_at=updated_at, + ) + + app_action_workflow_trigger_config.additional_properties = d + return app_action_workflow_trigger_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_action_workflow_trigger_type.py b/nuon/models/app_action_workflow_trigger_type.py new file mode 100644 index 00000000..77f4f668 --- /dev/null +++ b/nuon/models/app_action_workflow_trigger_type.py @@ -0,0 +1,31 @@ +from enum import Enum + + +class AppActionWorkflowTriggerType(str, Enum): + CRON = "cron" + MANUAL = "manual" + POST_DEPLOY_ALL_COMPONENTS = "post-deploy-all-components" + POST_DEPLOY_COMPONENT = "post-deploy-component" + POST_DEPROVISION = "post-deprovision" + POST_DEPROVISION_SANDBOX = "post-deprovision-sandbox" + POST_PROVISION = "post-provision" + POST_REPROVISION = "post-reprovision" + POST_REPROVISION_SANDBOX = "post-reprovision-sandbox" + POST_SECRETS_SYNC = "post-secrets-sync" + POST_TEARDOWN_ALL_COMPONENTS = "post-teardown-all-components" + POST_TEARDOWN_COMPONENT = "post-teardown-component" + POST_UPDATE_INPUTS = "post-update-inputs" + PRE_DEPLOY_ALL_COMPONENTS = "pre-deploy-all-components" + PRE_DEPLOY_COMPONENT = "pre-deploy-component" + PRE_DEPROVISION = "pre-deprovision" + PRE_DEPROVISION_SANDBOX = "pre-deprovision-sandbox" + PRE_PROVISION = "pre-provision" + PRE_REPROVISION = "pre-reprovision" + PRE_REPROVISION_SANDBOX = "pre-reprovision-sandbox" + PRE_SECRETS_SYNC = "pre-secrets-sync" + PRE_TEARDOWN_ALL_COMPONENTS = "pre-teardown-all-components" + PRE_TEARDOWN_COMPONENT = "pre-teardown-component" + PRE_UPDATE_INPUTS = "pre-update-inputs" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_app.py b/nuon/models/app_app.py new file mode 100644 index 00000000..4da12f71 --- /dev/null +++ b/nuon/models/app_app.py @@ -0,0 +1,291 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_config import AppAppConfig + from ..models.app_app_input_config import AppAppInputConfig + from ..models.app_app_links import AppAppLinks + from ..models.app_app_runner_config import AppAppRunnerConfig + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_notifications_config import AppNotificationsConfig + + +T = TypeVar("T", bound="AppApp") + + +@_attrs_define +class AppApp: + """ + Attributes: + app_configs (Union[Unset, list['AppAppConfig']]): + cloud_platform (Union[Unset, str]): + config_directory (Union[Unset, str]): + config_repo (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + id (Union[Unset, str]): + input_config (Union[Unset, AppAppInputConfig]): + links (Union[Unset, AppAppLinks]): + name (Union[Unset, str]): + notifications_config (Union[Unset, AppNotificationsConfig]): + org_id (Union[Unset, str]): + runner_config (Union[Unset, AppAppRunnerConfig]): + runner_type (Union[Unset, str]): + sandbox_config (Union[Unset, AppAppSandboxConfig]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_configs: Union[Unset, list["AppAppConfig"]] = UNSET + cloud_platform: Union[Unset, str] = UNSET + config_directory: Union[Unset, str] = UNSET + config_repo: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input_config: Union[Unset, "AppAppInputConfig"] = UNSET + links: Union[Unset, "AppAppLinks"] = UNSET + name: Union[Unset, str] = UNSET + notifications_config: Union[Unset, "AppNotificationsConfig"] = UNSET + org_id: Union[Unset, str] = UNSET + runner_config: Union[Unset, "AppAppRunnerConfig"] = UNSET + runner_type: Union[Unset, str] = UNSET + sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_configs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.app_configs, Unset): + app_configs = [] + for app_configs_item_data in self.app_configs: + app_configs_item = app_configs_item_data.to_dict() + app_configs.append(app_configs_item) + + cloud_platform = self.cloud_platform + + config_directory = self.config_directory + + config_repo = self.config_repo + + created_at = self.created_at + + created_by_id = self.created_by_id + + description = self.description + + display_name = self.display_name + + id = self.id + + input_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.input_config, Unset): + input_config = self.input_config.to_dict() + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + name = self.name + + notifications_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.notifications_config, Unset): + notifications_config = self.notifications_config.to_dict() + + org_id = self.org_id + + runner_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_config, Unset): + runner_config = self.runner_config.to_dict() + + runner_type = self.runner_type + + sandbox_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_config, Unset): + sandbox_config = self.sandbox_config.to_dict() + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_configs is not UNSET: + field_dict["app_configs"] = app_configs + if cloud_platform is not UNSET: + field_dict["cloud_platform"] = cloud_platform + if config_directory is not UNSET: + field_dict["config_directory"] = config_directory + if config_repo is not UNSET: + field_dict["config_repo"] = config_repo + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if id is not UNSET: + field_dict["id"] = id + if input_config is not UNSET: + field_dict["input_config"] = input_config + if links is not UNSET: + field_dict["links"] = links + if name is not UNSET: + field_dict["name"] = name + if notifications_config is not UNSET: + field_dict["notifications_config"] = notifications_config + if org_id is not UNSET: + field_dict["org_id"] = org_id + if runner_config is not UNSET: + field_dict["runner_config"] = runner_config + if runner_type is not UNSET: + field_dict["runner_type"] = runner_type + if sandbox_config is not UNSET: + field_dict["sandbox_config"] = sandbox_config + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_config import AppAppConfig + from ..models.app_app_input_config import AppAppInputConfig + from ..models.app_app_links import AppAppLinks + from ..models.app_app_runner_config import AppAppRunnerConfig + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_notifications_config import AppNotificationsConfig + + d = dict(src_dict) + app_configs = [] + _app_configs = d.pop("app_configs", UNSET) + for app_configs_item_data in _app_configs or []: + app_configs_item = AppAppConfig.from_dict(app_configs_item_data) + + app_configs.append(app_configs_item) + + cloud_platform = d.pop("cloud_platform", UNSET) + + config_directory = d.pop("config_directory", UNSET) + + config_repo = d.pop("config_repo", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + id = d.pop("id", UNSET) + + _input_config = d.pop("input_config", UNSET) + input_config: Union[Unset, AppAppInputConfig] + if isinstance(_input_config, Unset): + input_config = UNSET + else: + input_config = AppAppInputConfig.from_dict(_input_config) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppAppLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppAppLinks.from_dict(_links) + + name = d.pop("name", UNSET) + + _notifications_config = d.pop("notifications_config", UNSET) + notifications_config: Union[Unset, AppNotificationsConfig] + if isinstance(_notifications_config, Unset): + notifications_config = UNSET + else: + notifications_config = AppNotificationsConfig.from_dict(_notifications_config) + + org_id = d.pop("org_id", UNSET) + + _runner_config = d.pop("runner_config", UNSET) + runner_config: Union[Unset, AppAppRunnerConfig] + if isinstance(_runner_config, Unset): + runner_config = UNSET + else: + runner_config = AppAppRunnerConfig.from_dict(_runner_config) + + runner_type = d.pop("runner_type", UNSET) + + _sandbox_config = d.pop("sandbox_config", UNSET) + sandbox_config: Union[Unset, AppAppSandboxConfig] + if isinstance(_sandbox_config, Unset): + sandbox_config = UNSET + else: + sandbox_config = AppAppSandboxConfig.from_dict(_sandbox_config) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app = cls( + app_configs=app_configs, + cloud_platform=cloud_platform, + config_directory=config_directory, + config_repo=config_repo, + created_at=created_at, + created_by_id=created_by_id, + description=description, + display_name=display_name, + id=id, + input_config=input_config, + links=links, + name=name, + notifications_config=notifications_config, + org_id=org_id, + runner_config=runner_config, + runner_type=runner_type, + sandbox_config=sandbox_config, + status=status, + status_description=status_description, + updated_at=updated_at, + ) + + app_app.additional_properties = d + return app_app + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_awsiam_policy_config.py b/nuon/models/app_app_awsiam_policy_config.py new file mode 100644 index 00000000..53ac6bea --- /dev/null +++ b/nuon/models/app_app_awsiam_policy_config.py @@ -0,0 +1,149 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAppAWSIAMPolicyConfig") + + +@_attrs_define +class AppAppAWSIAMPolicyConfig: + """ + Attributes: + app_aws_iam_role_config_id (Union[Unset, str]): + app_config_id (Union[Unset, str]): + cloudformation_stack_name (Union[Unset, str]): + contents (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + managed_policy_name (Union[Unset, str]): + name (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_aws_iam_role_config_id: Union[Unset, str] = UNSET + app_config_id: Union[Unset, str] = UNSET + cloudformation_stack_name: Union[Unset, str] = UNSET + contents: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + managed_policy_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_aws_iam_role_config_id = self.app_aws_iam_role_config_id + + app_config_id = self.app_config_id + + cloudformation_stack_name = self.cloudformation_stack_name + + contents = self.contents + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + managed_policy_name = self.managed_policy_name + + name = self.name + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_aws_iam_role_config_id is not UNSET: + field_dict["app_aws_iam_role_config_id"] = app_aws_iam_role_config_id + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if cloudformation_stack_name is not UNSET: + field_dict["cloudformation_stack_name"] = cloudformation_stack_name + if contents is not UNSET: + field_dict["contents"] = contents + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if managed_policy_name is not UNSET: + field_dict["managed_policy_name"] = managed_policy_name + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_aws_iam_role_config_id = d.pop("app_aws_iam_role_config_id", UNSET) + + app_config_id = d.pop("app_config_id", UNSET) + + cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) + + contents = d.pop("contents", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + managed_policy_name = d.pop("managed_policy_name", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_awsiam_policy_config = cls( + app_aws_iam_role_config_id=app_aws_iam_role_config_id, + app_config_id=app_config_id, + cloudformation_stack_name=cloudformation_stack_name, + contents=contents, + created_at=created_at, + created_by_id=created_by_id, + id=id, + managed_policy_name=managed_policy_name, + name=name, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_awsiam_policy_config.additional_properties = d + return app_app_awsiam_policy_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_awsiam_role_config.py b/nuon/models/app_app_awsiam_role_config.py new file mode 100644 index 00000000..f9d84b72 --- /dev/null +++ b/nuon/models/app_app_awsiam_role_config.py @@ -0,0 +1,218 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_awsiam_role_type import AppAWSIAMRoleType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_awsiam_policy_config import AppAppAWSIAMPolicyConfig + + +T = TypeVar("T", bound="AppAppAWSIAMRoleConfig") + + +@_attrs_define +class AppAppAWSIAMRoleConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + cloudformation_param_name (Union[Unset, str]): + cloudformation_stack_name (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + id (Union[Unset, str]): + name (Union[Unset, str]): + org_id (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + permissions_boundary (Union[Unset, str]): + policies (Union[Unset, list['AppAppAWSIAMPolicyConfig']]): + type_ (Union[Unset, AppAWSIAMRoleType]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + cloudformation_param_name: Union[Unset, str] = UNSET + cloudformation_stack_name: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + permissions_boundary: Union[Unset, str] = UNSET + policies: Union[Unset, list["AppAppAWSIAMPolicyConfig"]] = UNSET + type_: Union[Unset, AppAWSIAMRoleType] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + cloudformation_param_name = self.cloudformation_param_name + + cloudformation_stack_name = self.cloudformation_stack_name + + created_at = self.created_at + + created_by_id = self.created_by_id + + description = self.description + + display_name = self.display_name + + id = self.id + + name = self.name + + org_id = self.org_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + permissions_boundary = self.permissions_boundary + + policies: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.policies, Unset): + policies = [] + for policies_item_data in self.policies: + policies_item = policies_item_data.to_dict() + policies.append(policies_item) + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if cloudformation_param_name is not UNSET: + field_dict["cloudformation_param_name"] = cloudformation_param_name + if cloudformation_stack_name is not UNSET: + field_dict["cloudformation_stack_name"] = cloudformation_stack_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if permissions_boundary is not UNSET: + field_dict["permissions_boundary"] = permissions_boundary + if policies is not UNSET: + field_dict["policies"] = policies + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_awsiam_policy_config import AppAppAWSIAMPolicyConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + cloudformation_param_name = d.pop("cloudformation_param_name", UNSET) + + cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + permissions_boundary = d.pop("permissions_boundary", UNSET) + + policies = [] + _policies = d.pop("policies", UNSET) + for policies_item_data in _policies or []: + policies_item = AppAppAWSIAMPolicyConfig.from_dict(policies_item_data) + + policies.append(policies_item) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppAWSIAMRoleType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppAWSIAMRoleType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + app_app_awsiam_role_config = cls( + app_config_id=app_config_id, + cloudformation_param_name=cloudformation_param_name, + cloudformation_stack_name=cloudformation_stack_name, + created_at=created_at, + created_by_id=created_by_id, + description=description, + display_name=display_name, + id=id, + name=name, + org_id=org_id, + owner_id=owner_id, + owner_type=owner_type, + permissions_boundary=permissions_boundary, + policies=policies, + type_=type_, + updated_at=updated_at, + ) + + app_app_awsiam_role_config.additional_properties = d + return app_app_awsiam_role_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_branch.py b/nuon/models/app_app_branch.py new file mode 100644 index 00000000..13815906 --- /dev/null +++ b/nuon/models/app_app_branch.py @@ -0,0 +1,147 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_workflow import AppWorkflow + + +T = TypeVar("T", bound="AppAppBranch") + + +@_attrs_define +class AppAppBranch: + """ + Attributes: + app_id (Union[Unset, str]): + connected_github_vcs_config_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + name (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + workflows (Union[Unset, list['AppWorkflow']]): + """ + + app_id: Union[Unset, str] = UNSET + connected_github_vcs_config_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + workflows: Union[Unset, list["AppWorkflow"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_id = self.app_id + + connected_github_vcs_config_id = self.connected_github_vcs_config_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + name = self.name + + org_id = self.org_id + + updated_at = self.updated_at + + workflows: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.workflows, Unset): + workflows = [] + for workflows_item_data in self.workflows: + workflows_item = workflows_item_data.to_dict() + workflows.append(workflows_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_id is not UNSET: + field_dict["app_id"] = app_id + if connected_github_vcs_config_id is not UNSET: + field_dict["connected_github_vcs_config_id"] = connected_github_vcs_config_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflows is not UNSET: + field_dict["workflows"] = workflows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_workflow import AppWorkflow + + d = dict(src_dict) + app_id = d.pop("app_id", UNSET) + + connected_github_vcs_config_id = d.pop("connected_github_vcs_config_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + workflows = [] + _workflows = d.pop("workflows", UNSET) + for workflows_item_data in _workflows or []: + workflows_item = AppWorkflow.from_dict(workflows_item_data) + + workflows.append(workflows_item) + + app_app_branch = cls( + app_id=app_id, + connected_github_vcs_config_id=connected_github_vcs_config_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + name=name, + org_id=org_id, + updated_at=updated_at, + workflows=workflows, + ) + + app_app_branch.additional_properties = d + return app_app_branch + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_break_glass_config.py b/nuon/models/app_app_break_glass_config.py new file mode 100644 index 00000000..b632a801 --- /dev/null +++ b/nuon/models/app_app_break_glass_config.py @@ -0,0 +1,138 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig + + +T = TypeVar("T", bound="AppAppBreakGlassConfig") + + +@_attrs_define +class AppAppBreakGlassConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + aws_iam_roles (Union[Unset, list['AppAppAWSIAMRoleConfig']]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + aws_iam_roles: Union[Unset, list["AppAppAWSIAMRoleConfig"]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + aws_iam_roles: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.aws_iam_roles, Unset): + aws_iam_roles = [] + for aws_iam_roles_item_data in self.aws_iam_roles: + aws_iam_roles_item = aws_iam_roles_item_data.to_dict() + aws_iam_roles.append(aws_iam_roles_item) + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if aws_iam_roles is not UNSET: + field_dict["aws_iam_roles"] = aws_iam_roles + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + aws_iam_roles = [] + _aws_iam_roles = d.pop("aws_iam_roles", UNSET) + for aws_iam_roles_item_data in _aws_iam_roles or []: + aws_iam_roles_item = AppAppAWSIAMRoleConfig.from_dict(aws_iam_roles_item_data) + + aws_iam_roles.append(aws_iam_roles_item) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_break_glass_config = cls( + app_config_id=app_config_id, + app_id=app_id, + aws_iam_roles=aws_iam_roles, + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_break_glass_config.additional_properties = d + return app_app_break_glass_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_config.py b/nuon/models/app_app_config.py new file mode 100644 index 00000000..7a4f328a --- /dev/null +++ b/nuon/models/app_app_config.py @@ -0,0 +1,423 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_app_config_status import AppAppConfigStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_action_workflow_config import AppActionWorkflowConfig + from ..models.app_app_branch import AppAppBranch + from ..models.app_app_break_glass_config import AppAppBreakGlassConfig + from ..models.app_app_input_config import AppAppInputConfig + from ..models.app_app_permissions_config import AppAppPermissionsConfig + from ..models.app_app_policies_config import AppAppPoliciesConfig + from ..models.app_app_runner_config import AppAppRunnerConfig + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_app_secrets_config import AppAppSecretsConfig + from ..models.app_app_stack_config import AppAppStackConfig + from ..models.app_component_config_connection import AppComponentConfigConnection + from ..models.app_vcs_connection_commit import AppVCSConnectionCommit + + +T = TypeVar("T", bound="AppAppConfig") + + +@_attrs_define +class AppAppConfig: + """ + Attributes: + action_workflow_configs (Union[Unset, list['AppActionWorkflowConfig']]): + app_branch (Union[Unset, AppAppBranch]): + app_branch_id (Union[Unset, str]): + app_id (Union[Unset, str]): + break_glass (Union[Unset, AppAppBreakGlassConfig]): + checksum (Union[Unset, str]): + cli_version (Union[Unset, str]): + component_config_connections (Union[Unset, list['AppComponentConfigConnection']]): + component_ids (Union[Unset, list[str]]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + input_ (Union[Unset, AppAppInputConfig]): + org_id (Union[Unset, str]): + permissions (Union[Unset, AppAppPermissionsConfig]): + policies (Union[Unset, AppAppPoliciesConfig]): + readme (Union[Unset, str]): + runner (Union[Unset, AppAppRunnerConfig]): + sandbox (Union[Unset, AppAppSandboxConfig]): + secrets (Union[Unset, AppAppSecretsConfig]): + stack (Union[Unset, AppAppStackConfig]): + state (Union[Unset, str]): + status (Union[Unset, AppAppConfigStatus]): + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + vcs_connection_commit (Union[Unset, AppVCSConnectionCommit]): + version (Union[Unset, int]): fields that are filled in via after query or views + """ + + action_workflow_configs: Union[Unset, list["AppActionWorkflowConfig"]] = UNSET + app_branch: Union[Unset, "AppAppBranch"] = UNSET + app_branch_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + break_glass: Union[Unset, "AppAppBreakGlassConfig"] = UNSET + checksum: Union[Unset, str] = UNSET + cli_version: Union[Unset, str] = UNSET + component_config_connections: Union[Unset, list["AppComponentConfigConnection"]] = UNSET + component_ids: Union[Unset, list[str]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input_: Union[Unset, "AppAppInputConfig"] = UNSET + org_id: Union[Unset, str] = UNSET + permissions: Union[Unset, "AppAppPermissionsConfig"] = UNSET + policies: Union[Unset, "AppAppPoliciesConfig"] = UNSET + readme: Union[Unset, str] = UNSET + runner: Union[Unset, "AppAppRunnerConfig"] = UNSET + sandbox: Union[Unset, "AppAppSandboxConfig"] = UNSET + secrets: Union[Unset, "AppAppSecretsConfig"] = UNSET + stack: Union[Unset, "AppAppStackConfig"] = UNSET + state: Union[Unset, str] = UNSET + status: Union[Unset, AppAppConfigStatus] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + vcs_connection_commit: Union[Unset, "AppVCSConnectionCommit"] = UNSET + version: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_configs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.action_workflow_configs, Unset): + action_workflow_configs = [] + for action_workflow_configs_item_data in self.action_workflow_configs: + action_workflow_configs_item = action_workflow_configs_item_data.to_dict() + action_workflow_configs.append(action_workflow_configs_item) + + app_branch: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.app_branch, Unset): + app_branch = self.app_branch.to_dict() + + app_branch_id = self.app_branch_id + + app_id = self.app_id + + break_glass: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.break_glass, Unset): + break_glass = self.break_glass.to_dict() + + checksum = self.checksum + + cli_version = self.cli_version + + component_config_connections: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.component_config_connections, Unset): + component_config_connections = [] + for component_config_connections_item_data in self.component_config_connections: + component_config_connections_item = component_config_connections_item_data.to_dict() + component_config_connections.append(component_config_connections_item) + + component_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.component_ids, Unset): + component_ids = self.component_ids + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + input_: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.input_, Unset): + input_ = self.input_.to_dict() + + org_id = self.org_id + + permissions: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.permissions, Unset): + permissions = self.permissions.to_dict() + + policies: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.policies, Unset): + policies = self.policies.to_dict() + + readme = self.readme + + runner: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner, Unset): + runner = self.runner.to_dict() + + sandbox: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox, Unset): + sandbox = self.sandbox.to_dict() + + secrets: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.secrets, Unset): + secrets = self.secrets.to_dict() + + stack: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.stack, Unset): + stack = self.stack.to_dict() + + state = self.state + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_description = self.status_description + + updated_at = self.updated_at + + vcs_connection_commit: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vcs_connection_commit, Unset): + vcs_connection_commit = self.vcs_connection_commit.to_dict() + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_configs is not UNSET: + field_dict["action_workflow_configs"] = action_workflow_configs + if app_branch is not UNSET: + field_dict["app_branch"] = app_branch + if app_branch_id is not UNSET: + field_dict["app_branch_id"] = app_branch_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if break_glass is not UNSET: + field_dict["break_glass"] = break_glass + if checksum is not UNSET: + field_dict["checksum"] = checksum + if cli_version is not UNSET: + field_dict["cli_version"] = cli_version + if component_config_connections is not UNSET: + field_dict["component_config_connections"] = component_config_connections + if component_ids is not UNSET: + field_dict["component_ids"] = component_ids + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if input_ is not UNSET: + field_dict["input"] = input_ + if org_id is not UNSET: + field_dict["org_id"] = org_id + if permissions is not UNSET: + field_dict["permissions"] = permissions + if policies is not UNSET: + field_dict["policies"] = policies + if readme is not UNSET: + field_dict["readme"] = readme + if runner is not UNSET: + field_dict["runner"] = runner + if sandbox is not UNSET: + field_dict["sandbox"] = sandbox + if secrets is not UNSET: + field_dict["secrets"] = secrets + if stack is not UNSET: + field_dict["stack"] = stack + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vcs_connection_commit is not UNSET: + field_dict["vcs_connection_commit"] = vcs_connection_commit + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_action_workflow_config import AppActionWorkflowConfig + from ..models.app_app_branch import AppAppBranch + from ..models.app_app_break_glass_config import AppAppBreakGlassConfig + from ..models.app_app_input_config import AppAppInputConfig + from ..models.app_app_permissions_config import AppAppPermissionsConfig + from ..models.app_app_policies_config import AppAppPoliciesConfig + from ..models.app_app_runner_config import AppAppRunnerConfig + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_app_secrets_config import AppAppSecretsConfig + from ..models.app_app_stack_config import AppAppStackConfig + from ..models.app_component_config_connection import AppComponentConfigConnection + from ..models.app_vcs_connection_commit import AppVCSConnectionCommit + + d = dict(src_dict) + action_workflow_configs = [] + _action_workflow_configs = d.pop("action_workflow_configs", UNSET) + for action_workflow_configs_item_data in _action_workflow_configs or []: + action_workflow_configs_item = AppActionWorkflowConfig.from_dict(action_workflow_configs_item_data) + + action_workflow_configs.append(action_workflow_configs_item) + + _app_branch = d.pop("app_branch", UNSET) + app_branch: Union[Unset, AppAppBranch] + if isinstance(_app_branch, Unset): + app_branch = UNSET + else: + app_branch = AppAppBranch.from_dict(_app_branch) + + app_branch_id = d.pop("app_branch_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + _break_glass = d.pop("break_glass", UNSET) + break_glass: Union[Unset, AppAppBreakGlassConfig] + if isinstance(_break_glass, Unset): + break_glass = UNSET + else: + break_glass = AppAppBreakGlassConfig.from_dict(_break_glass) + + checksum = d.pop("checksum", UNSET) + + cli_version = d.pop("cli_version", UNSET) + + component_config_connections = [] + _component_config_connections = d.pop("component_config_connections", UNSET) + for component_config_connections_item_data in _component_config_connections or []: + component_config_connections_item = AppComponentConfigConnection.from_dict( + component_config_connections_item_data + ) + + component_config_connections.append(component_config_connections_item) + + component_ids = cast(list[str], d.pop("component_ids", UNSET)) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _input_ = d.pop("input", UNSET) + input_: Union[Unset, AppAppInputConfig] + if isinstance(_input_, Unset): + input_ = UNSET + else: + input_ = AppAppInputConfig.from_dict(_input_) + + org_id = d.pop("org_id", UNSET) + + _permissions = d.pop("permissions", UNSET) + permissions: Union[Unset, AppAppPermissionsConfig] + if isinstance(_permissions, Unset): + permissions = UNSET + else: + permissions = AppAppPermissionsConfig.from_dict(_permissions) + + _policies = d.pop("policies", UNSET) + policies: Union[Unset, AppAppPoliciesConfig] + if isinstance(_policies, Unset): + policies = UNSET + else: + policies = AppAppPoliciesConfig.from_dict(_policies) + + readme = d.pop("readme", UNSET) + + _runner = d.pop("runner", UNSET) + runner: Union[Unset, AppAppRunnerConfig] + if isinstance(_runner, Unset): + runner = UNSET + else: + runner = AppAppRunnerConfig.from_dict(_runner) + + _sandbox = d.pop("sandbox", UNSET) + sandbox: Union[Unset, AppAppSandboxConfig] + if isinstance(_sandbox, Unset): + sandbox = UNSET + else: + sandbox = AppAppSandboxConfig.from_dict(_sandbox) + + _secrets = d.pop("secrets", UNSET) + secrets: Union[Unset, AppAppSecretsConfig] + if isinstance(_secrets, Unset): + secrets = UNSET + else: + secrets = AppAppSecretsConfig.from_dict(_secrets) + + _stack = d.pop("stack", UNSET) + stack: Union[Unset, AppAppStackConfig] + if isinstance(_stack, Unset): + stack = UNSET + else: + stack = AppAppStackConfig.from_dict(_stack) + + state = d.pop("state", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppAppConfigStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppAppConfigStatus(_status) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) + vcs_connection_commit: Union[Unset, AppVCSConnectionCommit] + if isinstance(_vcs_connection_commit, Unset): + vcs_connection_commit = UNSET + else: + vcs_connection_commit = AppVCSConnectionCommit.from_dict(_vcs_connection_commit) + + version = d.pop("version", UNSET) + + app_app_config = cls( + action_workflow_configs=action_workflow_configs, + app_branch=app_branch, + app_branch_id=app_branch_id, + app_id=app_id, + break_glass=break_glass, + checksum=checksum, + cli_version=cli_version, + component_config_connections=component_config_connections, + component_ids=component_ids, + created_at=created_at, + created_by_id=created_by_id, + id=id, + input_=input_, + org_id=org_id, + permissions=permissions, + policies=policies, + readme=readme, + runner=runner, + sandbox=sandbox, + secrets=secrets, + stack=stack, + state=state, + status=status, + status_description=status_description, + updated_at=updated_at, + vcs_connection_commit=vcs_connection_commit, + version=version, + ) + + app_app_config.additional_properties = d + return app_app_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_config_status.py b/nuon/models/app_app_config_status.py new file mode 100644 index 00000000..1185708d --- /dev/null +++ b/nuon/models/app_app_config_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AppAppConfigStatus(str, Enum): + ACTIVE = "active" + ERROR = "error" + OUTDATED = "outdated" + PENDING = "pending" + SYNCING = "syncing" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_app_config_version.py b/nuon/models/app_app_config_version.py new file mode 100644 index 00000000..0f979859 --- /dev/null +++ b/nuon/models/app_app_config_version.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AppAppConfigVersion(str, Enum): + V2 = "v2" + VALUE_0 = "" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_app_input.py b/nuon/models/app_app_input.py new file mode 100644 index 00000000..cc3a5161 --- /dev/null +++ b/nuon/models/app_app_input.py @@ -0,0 +1,216 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_input_group import AppAppInputGroup + + +T = TypeVar("T", bound="AppAppInput") + + +@_attrs_define +class AppAppInput: + """ + Attributes: + app_input_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + default (Union[Unset, str]): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + group (Union[Unset, AppAppInputGroup]): + group_id (Union[Unset, str]): + id (Union[Unset, str]): + index (Union[Unset, int]): + internal (Union[Unset, bool]): + name (Union[Unset, str]): + org_id (Union[Unset, str]): + required (Union[Unset, bool]): + sensitive (Union[Unset, bool]): + type_ (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_input_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + default: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + group: Union[Unset, "AppAppInputGroup"] = UNSET + group_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + index: Union[Unset, int] = UNSET + internal: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + required: Union[Unset, bool] = UNSET + sensitive: Union[Unset, bool] = UNSET + type_: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_input_id = self.app_input_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + default = self.default + + description = self.description + + display_name = self.display_name + + group: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + group_id = self.group_id + + id = self.id + + index = self.index + + internal = self.internal + + name = self.name + + org_id = self.org_id + + required = self.required + + sensitive = self.sensitive + + type_ = self.type_ + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_input_id is not UNSET: + field_dict["app_input_id"] = app_input_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if default is not UNSET: + field_dict["default"] = default + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if group is not UNSET: + field_dict["group"] = group + if group_id is not UNSET: + field_dict["group_id"] = group_id + if id is not UNSET: + field_dict["id"] = id + if index is not UNSET: + field_dict["index"] = index + if internal is not UNSET: + field_dict["internal"] = internal + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if required is not UNSET: + field_dict["required"] = required + if sensitive is not UNSET: + field_dict["sensitive"] = sensitive + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_input_group import AppAppInputGroup + + d = dict(src_dict) + app_input_id = d.pop("app_input_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + default = d.pop("default", UNSET) + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + _group = d.pop("group", UNSET) + group: Union[Unset, AppAppInputGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = AppAppInputGroup.from_dict(_group) + + group_id = d.pop("group_id", UNSET) + + id = d.pop("id", UNSET) + + index = d.pop("index", UNSET) + + internal = d.pop("internal", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + required = d.pop("required", UNSET) + + sensitive = d.pop("sensitive", UNSET) + + type_ = d.pop("type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_input = cls( + app_input_id=app_input_id, + created_at=created_at, + created_by_id=created_by_id, + default=default, + description=description, + display_name=display_name, + group=group, + group_id=group_id, + id=id, + index=index, + internal=internal, + name=name, + org_id=org_id, + required=required, + sensitive=sensitive, + type_=type_, + updated_at=updated_at, + ) + + app_app_input.additional_properties = d + return app_app_input + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_input_config.py b/nuon/models/app_app_input_config.py new file mode 100644 index 00000000..0f9459f9 --- /dev/null +++ b/nuon/models/app_app_input_config.py @@ -0,0 +1,180 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_input import AppAppInput + from ..models.app_app_input_group import AppAppInputGroup + from ..models.app_install_inputs import AppInstallInputs + + +T = TypeVar("T", bound="AppAppInputConfig") + + +@_attrs_define +class AppAppInputConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + input_groups (Union[Unset, list['AppAppInputGroup']]): + inputs (Union[Unset, list['AppAppInput']]): + install_inputs (Union[Unset, list['AppInstallInputs']]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input_groups: Union[Unset, list["AppAppInputGroup"]] = UNSET + inputs: Union[Unset, list["AppAppInput"]] = UNSET + install_inputs: Union[Unset, list["AppInstallInputs"]] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + input_groups: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.input_groups, Unset): + input_groups = [] + for input_groups_item_data in self.input_groups: + input_groups_item = input_groups_item_data.to_dict() + input_groups.append(input_groups_item) + + inputs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.inputs, Unset): + inputs = [] + for inputs_item_data in self.inputs: + inputs_item = inputs_item_data.to_dict() + inputs.append(inputs_item) + + install_inputs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_inputs, Unset): + install_inputs = [] + for install_inputs_item_data in self.install_inputs: + install_inputs_item = install_inputs_item_data.to_dict() + install_inputs.append(install_inputs_item) + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if input_groups is not UNSET: + field_dict["input_groups"] = input_groups + if inputs is not UNSET: + field_dict["inputs"] = inputs + if install_inputs is not UNSET: + field_dict["install_inputs"] = install_inputs + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_input import AppAppInput + from ..models.app_app_input_group import AppAppInputGroup + from ..models.app_install_inputs import AppInstallInputs + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + input_groups = [] + _input_groups = d.pop("input_groups", UNSET) + for input_groups_item_data in _input_groups or []: + input_groups_item = AppAppInputGroup.from_dict(input_groups_item_data) + + input_groups.append(input_groups_item) + + inputs = [] + _inputs = d.pop("inputs", UNSET) + for inputs_item_data in _inputs or []: + inputs_item = AppAppInput.from_dict(inputs_item_data) + + inputs.append(inputs_item) + + install_inputs = [] + _install_inputs = d.pop("install_inputs", UNSET) + for install_inputs_item_data in _install_inputs or []: + install_inputs_item = AppInstallInputs.from_dict(install_inputs_item_data) + + install_inputs.append(install_inputs_item) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_input_config = cls( + app_config_id=app_config_id, + app_id=app_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + input_groups=input_groups, + inputs=inputs, + install_inputs=install_inputs, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_input_config.additional_properties = d + return app_app_input_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_input_group.py b/nuon/models/app_app_input_group.py new file mode 100644 index 00000000..b8997f65 --- /dev/null +++ b/nuon/models/app_app_input_group.py @@ -0,0 +1,165 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_input import AppAppInput + + +T = TypeVar("T", bound="AppAppInputGroup") + + +@_attrs_define +class AppAppInputGroup: + """ + Attributes: + app_input_id (Union[Unset, str]): + app_inputs (Union[Unset, list['AppAppInput']]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + id (Union[Unset, str]): + index (Union[Unset, int]): + name (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_input_id: Union[Unset, str] = UNSET + app_inputs: Union[Unset, list["AppAppInput"]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + index: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_input_id = self.app_input_id + + app_inputs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.app_inputs, Unset): + app_inputs = [] + for app_inputs_item_data in self.app_inputs: + app_inputs_item = app_inputs_item_data.to_dict() + app_inputs.append(app_inputs_item) + + created_at = self.created_at + + created_by_id = self.created_by_id + + description = self.description + + display_name = self.display_name + + id = self.id + + index = self.index + + name = self.name + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_input_id is not UNSET: + field_dict["app_input_id"] = app_input_id + if app_inputs is not UNSET: + field_dict["app_inputs"] = app_inputs + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if id is not UNSET: + field_dict["id"] = id + if index is not UNSET: + field_dict["index"] = index + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_input import AppAppInput + + d = dict(src_dict) + app_input_id = d.pop("app_input_id", UNSET) + + app_inputs = [] + _app_inputs = d.pop("app_inputs", UNSET) + for app_inputs_item_data in _app_inputs or []: + app_inputs_item = AppAppInput.from_dict(app_inputs_item_data) + + app_inputs.append(app_inputs_item) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + id = d.pop("id", UNSET) + + index = d.pop("index", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_input_group = cls( + app_input_id=app_input_id, + app_inputs=app_inputs, + created_at=created_at, + created_by_id=created_by_id, + description=description, + display_name=display_name, + id=id, + index=index, + name=name, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_input_group.additional_properties = d + return app_app_input_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/nuon/models/app_app_links.py b/nuon/models/app_app_links.py new file mode 100644 index 00000000..ee945edf --- /dev/null +++ b/nuon/models/app_app_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppAppLinks") + + +@_attrs_define +class AppAppLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_app_links = cls() + + app_app_links.additional_properties = d + return app_app_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_permissions_config.py b/nuon/models/app_app_permissions_config.py new file mode 100644 index 00000000..3e2827d2 --- /dev/null +++ b/nuon/models/app_app_permissions_config.py @@ -0,0 +1,202 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig + + +T = TypeVar("T", bound="AppAppPermissionsConfig") + + +@_attrs_define +class AppAppPermissionsConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + aws_iam_roles (Union[Unset, list['AppAppAWSIAMRoleConfig']]): + break_glass_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + deprovision_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): + id (Union[Unset, str]): + maintenance_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): + org_id (Union[Unset, str]): + provision_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + aws_iam_roles: Union[Unset, list["AppAppAWSIAMRoleConfig"]] = UNSET + break_glass_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + deprovision_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET + id: Union[Unset, str] = UNSET + maintenance_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET + org_id: Union[Unset, str] = UNSET + provision_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + aws_iam_roles: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.aws_iam_roles, Unset): + aws_iam_roles = [] + for aws_iam_roles_item_data in self.aws_iam_roles: + aws_iam_roles_item = aws_iam_roles_item_data.to_dict() + aws_iam_roles.append(aws_iam_roles_item) + + break_glass_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.break_glass_aws_iam_role, Unset): + break_glass_aws_iam_role = self.break_glass_aws_iam_role.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + deprovision_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.deprovision_aws_iam_role, Unset): + deprovision_aws_iam_role = self.deprovision_aws_iam_role.to_dict() + + id = self.id + + maintenance_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.maintenance_aws_iam_role, Unset): + maintenance_aws_iam_role = self.maintenance_aws_iam_role.to_dict() + + org_id = self.org_id + + provision_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.provision_aws_iam_role, Unset): + provision_aws_iam_role = self.provision_aws_iam_role.to_dict() + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if aws_iam_roles is not UNSET: + field_dict["aws_iam_roles"] = aws_iam_roles + if break_glass_aws_iam_role is not UNSET: + field_dict["break_glass_aws_iam_role"] = break_glass_aws_iam_role + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if deprovision_aws_iam_role is not UNSET: + field_dict["deprovision_aws_iam_role"] = deprovision_aws_iam_role + if id is not UNSET: + field_dict["id"] = id + if maintenance_aws_iam_role is not UNSET: + field_dict["maintenance_aws_iam_role"] = maintenance_aws_iam_role + if org_id is not UNSET: + field_dict["org_id"] = org_id + if provision_aws_iam_role is not UNSET: + field_dict["provision_aws_iam_role"] = provision_aws_iam_role + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_awsiam_role_config import AppAppAWSIAMRoleConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + aws_iam_roles = [] + _aws_iam_roles = d.pop("aws_iam_roles", UNSET) + for aws_iam_roles_item_data in _aws_iam_roles or []: + aws_iam_roles_item = AppAppAWSIAMRoleConfig.from_dict(aws_iam_roles_item_data) + + aws_iam_roles.append(aws_iam_roles_item) + + _break_glass_aws_iam_role = d.pop("break_glass_aws_iam_role", UNSET) + break_glass_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + if isinstance(_break_glass_aws_iam_role, Unset): + break_glass_aws_iam_role = UNSET + else: + break_glass_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_break_glass_aws_iam_role) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _deprovision_aws_iam_role = d.pop("deprovision_aws_iam_role", UNSET) + deprovision_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + if isinstance(_deprovision_aws_iam_role, Unset): + deprovision_aws_iam_role = UNSET + else: + deprovision_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_deprovision_aws_iam_role) + + id = d.pop("id", UNSET) + + _maintenance_aws_iam_role = d.pop("maintenance_aws_iam_role", UNSET) + maintenance_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + if isinstance(_maintenance_aws_iam_role, Unset): + maintenance_aws_iam_role = UNSET + else: + maintenance_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_maintenance_aws_iam_role) + + org_id = d.pop("org_id", UNSET) + + _provision_aws_iam_role = d.pop("provision_aws_iam_role", UNSET) + provision_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + if isinstance(_provision_aws_iam_role, Unset): + provision_aws_iam_role = UNSET + else: + provision_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_provision_aws_iam_role) + + updated_at = d.pop("updated_at", UNSET) + + app_app_permissions_config = cls( + app_config_id=app_config_id, + app_id=app_id, + aws_iam_roles=aws_iam_roles, + break_glass_aws_iam_role=break_glass_aws_iam_role, + created_at=created_at, + created_by_id=created_by_id, + deprovision_aws_iam_role=deprovision_aws_iam_role, + id=id, + maintenance_aws_iam_role=maintenance_aws_iam_role, + org_id=org_id, + provision_aws_iam_role=provision_aws_iam_role, + updated_at=updated_at, + ) + + app_app_permissions_config.additional_properties = d + return app_app_permissions_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_policies_config.py b/nuon/models/app_app_policies_config.py new file mode 100644 index 00000000..e065f49d --- /dev/null +++ b/nuon/models/app_app_policies_config.py @@ -0,0 +1,113 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAppPoliciesConfig") + + +@_attrs_define +class AppAppPoliciesConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_policies_config = cls( + app_config_id=app_config_id, + app_id=app_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_policies_config.additional_properties = d + return app_app_policies_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_runner_config.py b/nuon/models/app_app_runner_config.py new file mode 100644 index 00000000..0603a6c2 --- /dev/null +++ b/nuon/models/app_app_runner_config.py @@ -0,0 +1,188 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_app_runner_type import AppAppRunnerType +from ..models.app_cloud_platform import AppCloudPlatform +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_runner_config_env_vars import AppAppRunnerConfigEnvVars + + +T = TypeVar("T", bound="AppAppRunnerConfig") + + +@_attrs_define +class AppAppRunnerConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + app_runner_type (Union[Unset, AppAppRunnerType]): + cloud_platform (Union[Unset, AppCloudPlatform]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + env_vars (Union[Unset, AppAppRunnerConfigEnvVars]): + helm_driver (Union[Unset, str]): + id (Union[Unset, str]): + init_script (Union[Unset, str]): takes a URL to a bash script ⤵ which will be `curl | bash`-ed on the VM. + usually via user-data or equivalent. + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + app_runner_type: Union[Unset, AppAppRunnerType] = UNSET + cloud_platform: Union[Unset, AppCloudPlatform] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + env_vars: Union[Unset, "AppAppRunnerConfigEnvVars"] = UNSET + helm_driver: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + init_script: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + app_runner_type: Union[Unset, str] = UNSET + if not isinstance(self.app_runner_type, Unset): + app_runner_type = self.app_runner_type.value + + cloud_platform: Union[Unset, str] = UNSET + if not isinstance(self.cloud_platform, Unset): + cloud_platform = self.cloud_platform.value + + created_at = self.created_at + + created_by_id = self.created_by_id + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + helm_driver = self.helm_driver + + id = self.id + + init_script = self.init_script + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if app_runner_type is not UNSET: + field_dict["app_runner_type"] = app_runner_type + if cloud_platform is not UNSET: + field_dict["cloud_platform"] = cloud_platform + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if helm_driver is not UNSET: + field_dict["helm_driver"] = helm_driver + if id is not UNSET: + field_dict["id"] = id + if init_script is not UNSET: + field_dict["init_script"] = init_script + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_runner_config_env_vars import AppAppRunnerConfigEnvVars + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + _app_runner_type = d.pop("app_runner_type", UNSET) + app_runner_type: Union[Unset, AppAppRunnerType] + if isinstance(_app_runner_type, Unset): + app_runner_type = UNSET + else: + app_runner_type = AppAppRunnerType(_app_runner_type) + + _cloud_platform = d.pop("cloud_platform", UNSET) + cloud_platform: Union[Unset, AppCloudPlatform] + if isinstance(_cloud_platform, Unset): + cloud_platform = UNSET + else: + cloud_platform = AppCloudPlatform(_cloud_platform) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, AppAppRunnerConfigEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = AppAppRunnerConfigEnvVars.from_dict(_env_vars) + + helm_driver = d.pop("helm_driver", UNSET) + + id = d.pop("id", UNSET) + + init_script = d.pop("init_script", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_runner_config = cls( + app_config_id=app_config_id, + app_id=app_id, + app_runner_type=app_runner_type, + cloud_platform=cloud_platform, + created_at=created_at, + created_by_id=created_by_id, + env_vars=env_vars, + helm_driver=helm_driver, + id=id, + init_script=init_script, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_runner_config.additional_properties = d + return app_app_runner_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_runner_config_env_vars.py b/nuon/models/app_app_runner_config_env_vars.py new file mode 100644 index 00000000..d03223c0 --- /dev/null +++ b/nuon/models/app_app_runner_config_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppAppRunnerConfigEnvVars") + + +@_attrs_define +class AppAppRunnerConfigEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_app_runner_config_env_vars = cls() + + app_app_runner_config_env_vars.additional_properties = d + return app_app_runner_config_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_runner_config_helm_driver_type.py b/nuon/models/app_app_runner_config_helm_driver_type.py new file mode 100644 index 00000000..1acba890 --- /dev/null +++ b/nuon/models/app_app_runner_config_helm_driver_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AppAppRunnerConfigHelmDriverType(str, Enum): + CONFIGMAP = "configmap" + SECRET = "secret" + VALUE_2 = "" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_app_runner_type.py b/nuon/models/app_app_runner_type.py new file mode 100644 index 00000000..706eabcb --- /dev/null +++ b/nuon/models/app_app_runner_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class AppAppRunnerType(str, Enum): + AWS = "aws" + AWS_ECS = "aws-ecs" + AWS_EKS = "aws-eks" + AZURE = "azure" + AZURE_ACS = "azure-acs" + AZURE_AKS = "azure-aks" + LOCAL = "local" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_app_sandbox_config.py b/nuon/models/app_app_sandbox_config.py new file mode 100644 index 00000000..c924955e --- /dev/null +++ b/nuon/models/app_app_sandbox_config.py @@ -0,0 +1,268 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_sandbox_config_env_vars import AppAppSandboxConfigEnvVars + from ..models.app_app_sandbox_config_variables import AppAppSandboxConfigVariables + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + from ..models.refs_ref import RefsRef + + +T = TypeVar("T", bound="AppAppSandboxConfig") + + +@_attrs_define +class AppAppSandboxConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + aws_region_type (Union[Unset, str]): cloud specific fields + cloud_platform (Union[Unset, str]): fields set via after query + connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + drift_schedule (Union[Unset, str]): + env_vars (Union[Unset, AppAppSandboxConfigEnvVars]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): + references (Union[Unset, list[str]]): + refs (Union[Unset, list['RefsRef']]): + terraform_version (Union[Unset, str]): + updated_at (Union[Unset, str]): + variables (Union[Unset, AppAppSandboxConfigVariables]): + variables_files (Union[Unset, list[str]]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + aws_region_type: Union[Unset, str] = UNSET + cloud_platform: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + drift_schedule: Union[Unset, str] = UNSET + env_vars: Union[Unset, "AppAppSandboxConfigEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET + references: Union[Unset, list[str]] = UNSET + refs: Union[Unset, list["RefsRef"]] = UNSET + terraform_version: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + variables: Union[Unset, "AppAppSandboxConfigVariables"] = UNSET + variables_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + aws_region_type = self.aws_region_type + + cloud_platform = self.cloud_platform + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + drift_schedule = self.drift_schedule + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + org_id = self.org_id + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + refs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.refs, Unset): + refs = [] + for refs_item_data in self.refs: + refs_item = refs_item_data.to_dict() + refs.append(refs_item) + + terraform_version = self.terraform_version + + updated_at = self.updated_at + + variables: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.variables, Unset): + variables = self.variables.to_dict() + + variables_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.variables_files, Unset): + variables_files = self.variables_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if aws_region_type is not UNSET: + field_dict["aws_region_type"] = aws_region_type + if cloud_platform is not UNSET: + field_dict["cloud_platform"] = cloud_platform + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if refs is not UNSET: + field_dict["refs"] = refs + if terraform_version is not UNSET: + field_dict["terraform_version"] = terraform_version + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if variables is not UNSET: + field_dict["variables"] = variables + if variables_files is not UNSET: + field_dict["variables_files"] = variables_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_sandbox_config_env_vars import AppAppSandboxConfigEnvVars + from ..models.app_app_sandbox_config_variables import AppAppSandboxConfigVariables + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + from ..models.refs_ref import RefsRef + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + aws_region_type = d.pop("aws_region_type", UNSET) + + cloud_platform = d.pop("cloud_platform", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + drift_schedule = d.pop("drift_schedule", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, AppAppSandboxConfigEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = AppAppSandboxConfigEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + refs = [] + _refs = d.pop("refs", UNSET) + for refs_item_data in _refs or []: + refs_item = RefsRef.from_dict(refs_item_data) + + refs.append(refs_item) + + terraform_version = d.pop("terraform_version", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _variables = d.pop("variables", UNSET) + variables: Union[Unset, AppAppSandboxConfigVariables] + if isinstance(_variables, Unset): + variables = UNSET + else: + variables = AppAppSandboxConfigVariables.from_dict(_variables) + + variables_files = cast(list[str], d.pop("variables_files", UNSET)) + + app_app_sandbox_config = cls( + app_config_id=app_config_id, + app_id=app_id, + aws_region_type=aws_region_type, + cloud_platform=cloud_platform, + connected_github_vcs_config=connected_github_vcs_config, + created_at=created_at, + created_by_id=created_by_id, + drift_schedule=drift_schedule, + env_vars=env_vars, + id=id, + org_id=org_id, + public_git_vcs_config=public_git_vcs_config, + references=references, + refs=refs, + terraform_version=terraform_version, + updated_at=updated_at, + variables=variables, + variables_files=variables_files, + ) + + app_app_sandbox_config.additional_properties = d + return app_app_sandbox_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_sandbox_config_env_vars.py b/nuon/models/app_app_sandbox_config_env_vars.py new file mode 100644 index 00000000..814a5d9e --- /dev/null +++ b/nuon/models/app_app_sandbox_config_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppAppSandboxConfigEnvVars") + + +@_attrs_define +class AppAppSandboxConfigEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_app_sandbox_config_env_vars = cls() + + app_app_sandbox_config_env_vars.additional_properties = d + return app_app_sandbox_config_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_sandbox_config_variables.py b/nuon/models/app_app_sandbox_config_variables.py new file mode 100644 index 00000000..9b2cb808 --- /dev/null +++ b/nuon/models/app_app_sandbox_config_variables.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppAppSandboxConfigVariables") + + +@_attrs_define +class AppAppSandboxConfigVariables: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_app_sandbox_config_variables = cls() + + app_app_sandbox_config_variables.additional_properties = d + return app_app_sandbox_config_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_secret.py b/nuon/models/app_app_secret.py new file mode 100644 index 00000000..916eb156 --- /dev/null +++ b/nuon/models/app_app_secret.py @@ -0,0 +1,122 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAppSecret") + + +@_attrs_define +class AppAppSecret: + """ + Attributes: + app_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + length (Union[Unset, int]): after query fields + name (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_id = self.app_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + length = self.length + + name = self.name + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_id is not UNSET: + field_dict["app_id"] = app_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_id = d.pop("app_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_secret = cls( + app_id=app_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + length=length, + name=name, + org_id=org_id, + updated_at=updated_at, + ) + + app_app_secret.additional_properties = d + return app_app_secret + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_secret_config.py b/nuon/models/app_app_secret_config.py new file mode 100644 index 00000000..9a509027 --- /dev/null +++ b/nuon/models/app_app_secret_config.py @@ -0,0 +1,230 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAppSecretConfig") + + +@_attrs_define +class AppAppSecretConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + app_secrets_config_id (Union[Unset, str]): + auto_generate (Union[Unset, bool]): + cloudformation_param_name (Union[Unset, str]): + cloudformation_stack_name (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + default (Union[Unset, str]): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + format_ (Union[Unset, str]): + id (Union[Unset, str]): + kubernetes_secret_name (Union[Unset, str]): + kubernetes_secret_namespace (Union[Unset, str]): + kubernetes_sync (Union[Unset, bool]): for syncing into kubernetes + name (Union[Unset, str]): + org_id (Union[Unset, str]): + required (Union[Unset, bool]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + app_secrets_config_id: Union[Unset, str] = UNSET + auto_generate: Union[Unset, bool] = UNSET + cloudformation_param_name: Union[Unset, str] = UNSET + cloudformation_stack_name: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + default: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + format_: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + kubernetes_secret_name: Union[Unset, str] = UNSET + kubernetes_secret_namespace: Union[Unset, str] = UNSET + kubernetes_sync: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + required: Union[Unset, bool] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + app_secrets_config_id = self.app_secrets_config_id + + auto_generate = self.auto_generate + + cloudformation_param_name = self.cloudformation_param_name + + cloudformation_stack_name = self.cloudformation_stack_name + + created_at = self.created_at + + created_by_id = self.created_by_id + + default = self.default + + description = self.description + + display_name = self.display_name + + format_ = self.format_ + + id = self.id + + kubernetes_secret_name = self.kubernetes_secret_name + + kubernetes_secret_namespace = self.kubernetes_secret_namespace + + kubernetes_sync = self.kubernetes_sync + + name = self.name + + org_id = self.org_id + + required = self.required + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if app_secrets_config_id is not UNSET: + field_dict["app_secrets_config_id"] = app_secrets_config_id + if auto_generate is not UNSET: + field_dict["auto_generate"] = auto_generate + if cloudformation_param_name is not UNSET: + field_dict["cloudformation_param_name"] = cloudformation_param_name + if cloudformation_stack_name is not UNSET: + field_dict["cloudformation_stack_name"] = cloudformation_stack_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if default is not UNSET: + field_dict["default"] = default + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if format_ is not UNSET: + field_dict["format"] = format_ + if id is not UNSET: + field_dict["id"] = id + if kubernetes_secret_name is not UNSET: + field_dict["kubernetes_secret_name"] = kubernetes_secret_name + if kubernetes_secret_namespace is not UNSET: + field_dict["kubernetes_secret_namespace"] = kubernetes_secret_namespace + if kubernetes_sync is not UNSET: + field_dict["kubernetes_sync"] = kubernetes_sync + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if required is not UNSET: + field_dict["required"] = required + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + app_secrets_config_id = d.pop("app_secrets_config_id", UNSET) + + auto_generate = d.pop("auto_generate", UNSET) + + cloudformation_param_name = d.pop("cloudformation_param_name", UNSET) + + cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + default = d.pop("default", UNSET) + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + format_ = d.pop("format", UNSET) + + id = d.pop("id", UNSET) + + kubernetes_secret_name = d.pop("kubernetes_secret_name", UNSET) + + kubernetes_secret_namespace = d.pop("kubernetes_secret_namespace", UNSET) + + kubernetes_sync = d.pop("kubernetes_sync", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + required = d.pop("required", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_app_secret_config = cls( + app_config_id=app_config_id, + app_id=app_id, + app_secrets_config_id=app_secrets_config_id, + auto_generate=auto_generate, + cloudformation_param_name=cloudformation_param_name, + cloudformation_stack_name=cloudformation_stack_name, + created_at=created_at, + created_by_id=created_by_id, + default=default, + description=description, + display_name=display_name, + format_=format_, + id=id, + kubernetes_secret_name=kubernetes_secret_name, + kubernetes_secret_namespace=kubernetes_secret_namespace, + kubernetes_sync=kubernetes_sync, + name=name, + org_id=org_id, + required=required, + updated_at=updated_at, + ) + + app_app_secret_config.additional_properties = d + return app_app_secret_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_secrets_config.py b/nuon/models/app_app_secrets_config.py new file mode 100644 index 00000000..0a665de8 --- /dev/null +++ b/nuon/models/app_app_secrets_config.py @@ -0,0 +1,138 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_secret_config import AppAppSecretConfig + + +T = TypeVar("T", bound="AppAppSecretsConfig") + + +@_attrs_define +class AppAppSecretsConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + secrets (Union[Unset, list['AppAppSecretConfig']]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + secrets: Union[Unset, list["AppAppSecretConfig"]] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + secrets: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.secrets, Unset): + secrets = [] + for secrets_item_data in self.secrets: + secrets_item = secrets_item_data.to_dict() + secrets.append(secrets_item) + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if secrets is not UNSET: + field_dict["secrets"] = secrets + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_secret_config import AppAppSecretConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + secrets = [] + _secrets = d.pop("secrets", UNSET) + for secrets_item_data in _secrets or []: + secrets_item = AppAppSecretConfig.from_dict(secrets_item_data) + + secrets.append(secrets_item) + + updated_at = d.pop("updated_at", UNSET) + + app_app_secrets_config = cls( + app_config_id=app_config_id, + app_id=app_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + secrets=secrets, + updated_at=updated_at, + ) + + app_app_secrets_config.additional_properties = d + return app_app_secrets_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_app_stack_config.py b/nuon/models/app_app_stack_config.py new file mode 100644 index 00000000..452a0005 --- /dev/null +++ b/nuon/models/app_app_stack_config.py @@ -0,0 +1,166 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_stack_type import AppStackType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAppStackConfig") + + +@_attrs_define +class AppAppStackConfig: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + description (Union[Unset, str]): + id (Union[Unset, str]): + name (Union[Unset, str]): + org_id (Union[Unset, str]): + runner_nested_template_url (Union[Unset, str]): + type_ (Union[Unset, AppStackType]): + updated_at (Union[Unset, str]): + vpc_nested_template_url (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + runner_nested_template_url: Union[Unset, str] = UNSET + type_: Union[Unset, AppStackType] = UNSET + updated_at: Union[Unset, str] = UNSET + vpc_nested_template_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + description = self.description + + id = self.id + + name = self.name + + org_id = self.org_id + + runner_nested_template_url = self.runner_nested_template_url + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + vpc_nested_template_url = self.vpc_nested_template_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if description is not UNSET: + field_dict["description"] = description + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if org_id is not UNSET: + field_dict["org_id"] = org_id + if runner_nested_template_url is not UNSET: + field_dict["runner_nested_template_url"] = runner_nested_template_url + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vpc_nested_template_url is not UNSET: + field_dict["vpc_nested_template_url"] = vpc_nested_template_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + description = d.pop("description", UNSET) + + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + org_id = d.pop("org_id", UNSET) + + runner_nested_template_url = d.pop("runner_nested_template_url", UNSET) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppStackType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppStackType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + vpc_nested_template_url = d.pop("vpc_nested_template_url", UNSET) + + app_app_stack_config = cls( + app_config_id=app_config_id, + app_id=app_id, + created_at=created_at, + created_by_id=created_by_id, + description=description, + id=id, + name=name, + org_id=org_id, + runner_nested_template_url=runner_nested_template_url, + type_=type_, + updated_at=updated_at, + vpc_nested_template_url=vpc_nested_template_url, + ) + + app_app_stack_config.additional_properties = d + return app_app_stack_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_aws_account.py b/nuon/models/app_aws_account.py new file mode 100644 index 00000000..2fb97953 --- /dev/null +++ b/nuon/models/app_aws_account.py @@ -0,0 +1,104 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAWSAccount") + + +@_attrs_define +class AppAWSAccount: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + iam_role_arn (Union[Unset, str]): + id (Union[Unset, str]): + region (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + iam_role_arn: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + region: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + iam_role_arn = self.iam_role_arn + + id = self.id + + region = self.region + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if iam_role_arn is not UNSET: + field_dict["iam_role_arn"] = iam_role_arn + if id is not UNSET: + field_dict["id"] = id + if region is not UNSET: + field_dict["region"] = region + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + iam_role_arn = d.pop("iam_role_arn", UNSET) + + id = d.pop("id", UNSET) + + region = d.pop("region", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_aws_account = cls( + created_at=created_at, + created_by_id=created_by_id, + iam_role_arn=iam_role_arn, + id=id, + region=region, + updated_at=updated_at, + ) + + app_aws_account.additional_properties = d + return app_aws_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_aws_stack_outputs.py b/nuon/models/app_aws_stack_outputs.py new file mode 100644 index 00000000..ec97efd1 --- /dev/null +++ b/nuon/models/app_aws_stack_outputs.py @@ -0,0 +1,166 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns + + +T = TypeVar("T", bound="AppAWSStackOutputs") + + +@_attrs_define +class AppAWSStackOutputs: + """ + Attributes: + account_id (Union[Unset, str]): + break_glass_role_arns (Union[Unset, AppAWSStackOutputsBreakGlassRoleArns]): + deprovision_iam_role_arn (Union[Unset, str]): + maintenance_iam_role_arn (Union[Unset, str]): + private_subnets (Union[Unset, list[str]]): + provision_iam_role_arn (Union[Unset, str]): + public_subnets (Union[Unset, list[str]]): + region (Union[Unset, str]): + runner_iam_role_arn (Union[Unset, str]): + runner_subnet (Union[Unset, str]): + vpc_id (Union[Unset, str]): + """ + + account_id: Union[Unset, str] = UNSET + break_glass_role_arns: Union[Unset, "AppAWSStackOutputsBreakGlassRoleArns"] = UNSET + deprovision_iam_role_arn: Union[Unset, str] = UNSET + maintenance_iam_role_arn: Union[Unset, str] = UNSET + private_subnets: Union[Unset, list[str]] = UNSET + provision_iam_role_arn: Union[Unset, str] = UNSET + public_subnets: Union[Unset, list[str]] = UNSET + region: Union[Unset, str] = UNSET + runner_iam_role_arn: Union[Unset, str] = UNSET + runner_subnet: Union[Unset, str] = UNSET + vpc_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + account_id = self.account_id + + break_glass_role_arns: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.break_glass_role_arns, Unset): + break_glass_role_arns = self.break_glass_role_arns.to_dict() + + deprovision_iam_role_arn = self.deprovision_iam_role_arn + + maintenance_iam_role_arn = self.maintenance_iam_role_arn + + private_subnets: Union[Unset, list[str]] = UNSET + if not isinstance(self.private_subnets, Unset): + private_subnets = self.private_subnets + + provision_iam_role_arn = self.provision_iam_role_arn + + public_subnets: Union[Unset, list[str]] = UNSET + if not isinstance(self.public_subnets, Unset): + public_subnets = self.public_subnets + + region = self.region + + runner_iam_role_arn = self.runner_iam_role_arn + + runner_subnet = self.runner_subnet + + vpc_id = self.vpc_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if account_id is not UNSET: + field_dict["account_id"] = account_id + if break_glass_role_arns is not UNSET: + field_dict["break_glass_role_arns"] = break_glass_role_arns + if deprovision_iam_role_arn is not UNSET: + field_dict["deprovision_iam_role_arn"] = deprovision_iam_role_arn + if maintenance_iam_role_arn is not UNSET: + field_dict["maintenance_iam_role_arn"] = maintenance_iam_role_arn + if private_subnets is not UNSET: + field_dict["private_subnets"] = private_subnets + if provision_iam_role_arn is not UNSET: + field_dict["provision_iam_role_arn"] = provision_iam_role_arn + if public_subnets is not UNSET: + field_dict["public_subnets"] = public_subnets + if region is not UNSET: + field_dict["region"] = region + if runner_iam_role_arn is not UNSET: + field_dict["runner_iam_role_arn"] = runner_iam_role_arn + if runner_subnet is not UNSET: + field_dict["runner_subnet"] = runner_subnet + if vpc_id is not UNSET: + field_dict["vpc_id"] = vpc_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns + + d = dict(src_dict) + account_id = d.pop("account_id", UNSET) + + _break_glass_role_arns = d.pop("break_glass_role_arns", UNSET) + break_glass_role_arns: Union[Unset, AppAWSStackOutputsBreakGlassRoleArns] + if isinstance(_break_glass_role_arns, Unset): + break_glass_role_arns = UNSET + else: + break_glass_role_arns = AppAWSStackOutputsBreakGlassRoleArns.from_dict(_break_glass_role_arns) + + deprovision_iam_role_arn = d.pop("deprovision_iam_role_arn", UNSET) + + maintenance_iam_role_arn = d.pop("maintenance_iam_role_arn", UNSET) + + private_subnets = cast(list[str], d.pop("private_subnets", UNSET)) + + provision_iam_role_arn = d.pop("provision_iam_role_arn", UNSET) + + public_subnets = cast(list[str], d.pop("public_subnets", UNSET)) + + region = d.pop("region", UNSET) + + runner_iam_role_arn = d.pop("runner_iam_role_arn", UNSET) + + runner_subnet = d.pop("runner_subnet", UNSET) + + vpc_id = d.pop("vpc_id", UNSET) + + app_aws_stack_outputs = cls( + account_id=account_id, + break_glass_role_arns=break_glass_role_arns, + deprovision_iam_role_arn=deprovision_iam_role_arn, + maintenance_iam_role_arn=maintenance_iam_role_arn, + private_subnets=private_subnets, + provision_iam_role_arn=provision_iam_role_arn, + public_subnets=public_subnets, + region=region, + runner_iam_role_arn=runner_iam_role_arn, + runner_subnet=runner_subnet, + vpc_id=vpc_id, + ) + + app_aws_stack_outputs.additional_properties = d + return app_aws_stack_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py b/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py new file mode 100644 index 00000000..8df2d2ef --- /dev/null +++ b/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppAWSStackOutputsBreakGlassRoleArns") + + +@_attrs_define +class AppAWSStackOutputsBreakGlassRoleArns: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_aws_stack_outputs_break_glass_role_arns = cls() + + app_aws_stack_outputs_break_glass_role_arns.additional_properties = d + return app_aws_stack_outputs_break_glass_role_arns + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_awsecr_image_config.py b/nuon/models/app_awsecr_image_config.py new file mode 100644 index 00000000..13a111f7 --- /dev/null +++ b/nuon/models/app_awsecr_image_config.py @@ -0,0 +1,122 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAWSECRImageConfig") + + +@_attrs_define +class AppAWSECRImageConfig: + """ + Attributes: + aws_region (Union[Unset, str]): + component_config_id (Union[Unset, str]): connection to parent model + component_config_type (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + iam_role_arn (Union[Unset, str]): actual configuration + id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + aws_region: Union[Unset, str] = UNSET + component_config_id: Union[Unset, str] = UNSET + component_config_type: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + iam_role_arn: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_region = self.aws_region + + component_config_id = self.component_config_id + + component_config_type = self.component_config_type + + created_at = self.created_at + + created_by_id = self.created_by_id + + iam_role_arn = self.iam_role_arn + + id = self.id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_region is not UNSET: + field_dict["aws_region"] = aws_region + if component_config_id is not UNSET: + field_dict["component_config_id"] = component_config_id + if component_config_type is not UNSET: + field_dict["component_config_type"] = component_config_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if iam_role_arn is not UNSET: + field_dict["iam_role_arn"] = iam_role_arn + if id is not UNSET: + field_dict["id"] = id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + aws_region = d.pop("aws_region", UNSET) + + component_config_id = d.pop("component_config_id", UNSET) + + component_config_type = d.pop("component_config_type", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + iam_role_arn = d.pop("iam_role_arn", UNSET) + + id = d.pop("id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_awsecr_image_config = cls( + aws_region=aws_region, + component_config_id=component_config_id, + component_config_type=component_config_type, + created_at=created_at, + created_by_id=created_by_id, + iam_role_arn=iam_role_arn, + id=id, + updated_at=updated_at, + ) + + app_awsecr_image_config.additional_properties = d + return app_awsecr_image_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_awsiam_role_type.py b/nuon/models/app_awsiam_role_type.py new file mode 100644 index 00000000..5a94d092 --- /dev/null +++ b/nuon/models/app_awsiam_role_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AppAWSIAMRoleType(str, Enum): + BREAKGLASS = "breakglass" + RUNNER_BREAKGLASS = "runner_breakglass" + RUNNER_DEPROVISION = "runner_deprovision" + RUNNER_MAINTENANCE = "runner_maintenance" + RUNNER_PROVISION = "runner_provision" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_azure_account.py b/nuon/models/app_azure_account.py new file mode 100644 index 00000000..61d5d03b --- /dev/null +++ b/nuon/models/app_azure_account.py @@ -0,0 +1,131 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAzureAccount") + + +@_attrs_define +class AppAzureAccount: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + location (Union[Unset, str]): + service_principal_app_id (Union[Unset, str]): + service_principal_password (Union[Unset, str]): + subscription_id (Union[Unset, str]): + subscription_tenant_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + location: Union[Unset, str] = UNSET + service_principal_app_id: Union[Unset, str] = UNSET + service_principal_password: Union[Unset, str] = UNSET + subscription_id: Union[Unset, str] = UNSET + subscription_tenant_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + location = self.location + + service_principal_app_id = self.service_principal_app_id + + service_principal_password = self.service_principal_password + + subscription_id = self.subscription_id + + subscription_tenant_id = self.subscription_tenant_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if location is not UNSET: + field_dict["location"] = location + if service_principal_app_id is not UNSET: + field_dict["service_principal_app_id"] = service_principal_app_id + if service_principal_password is not UNSET: + field_dict["service_principal_password"] = service_principal_password + if subscription_id is not UNSET: + field_dict["subscription_id"] = subscription_id + if subscription_tenant_id is not UNSET: + field_dict["subscription_tenant_id"] = subscription_tenant_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + location = d.pop("location", UNSET) + + service_principal_app_id = d.pop("service_principal_app_id", UNSET) + + service_principal_password = d.pop("service_principal_password", UNSET) + + subscription_id = d.pop("subscription_id", UNSET) + + subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_azure_account = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + location=location, + service_principal_app_id=service_principal_app_id, + service_principal_password=service_principal_password, + subscription_id=subscription_id, + subscription_tenant_id=subscription_tenant_id, + updated_at=updated_at, + ) + + app_azure_account.additional_properties = d + return app_azure_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_azure_stack_outputs.py b/nuon/models/app_azure_stack_outputs.py new file mode 100644 index 00000000..5dacd8c5 --- /dev/null +++ b/nuon/models/app_azure_stack_outputs.py @@ -0,0 +1,175 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppAzureStackOutputs") + + +@_attrs_define +class AppAzureStackOutputs: + """ + Attributes: + key_vault_id (Union[Unset, str]): + key_vault_name (Union[Unset, str]): + network_id (Union[Unset, str]): + network_name (Union[Unset, str]): + private_subnet_ids (Union[Unset, list[str]]): + private_subnet_names (Union[Unset, list[str]]): + public_subnet_ids (Union[Unset, list[str]]): + public_subnet_names (Union[Unset, list[str]]): + resource_group_id (Union[Unset, str]): + resource_group_location (Union[Unset, str]): + resource_group_name (Union[Unset, str]): + subscription_id (Union[Unset, str]): + subscription_tenant_id (Union[Unset, str]): + """ + + key_vault_id: Union[Unset, str] = UNSET + key_vault_name: Union[Unset, str] = UNSET + network_id: Union[Unset, str] = UNSET + network_name: Union[Unset, str] = UNSET + private_subnet_ids: Union[Unset, list[str]] = UNSET + private_subnet_names: Union[Unset, list[str]] = UNSET + public_subnet_ids: Union[Unset, list[str]] = UNSET + public_subnet_names: Union[Unset, list[str]] = UNSET + resource_group_id: Union[Unset, str] = UNSET + resource_group_location: Union[Unset, str] = UNSET + resource_group_name: Union[Unset, str] = UNSET + subscription_id: Union[Unset, str] = UNSET + subscription_tenant_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + key_vault_id = self.key_vault_id + + key_vault_name = self.key_vault_name + + network_id = self.network_id + + network_name = self.network_name + + private_subnet_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.private_subnet_ids, Unset): + private_subnet_ids = self.private_subnet_ids + + private_subnet_names: Union[Unset, list[str]] = UNSET + if not isinstance(self.private_subnet_names, Unset): + private_subnet_names = self.private_subnet_names + + public_subnet_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.public_subnet_ids, Unset): + public_subnet_ids = self.public_subnet_ids + + public_subnet_names: Union[Unset, list[str]] = UNSET + if not isinstance(self.public_subnet_names, Unset): + public_subnet_names = self.public_subnet_names + + resource_group_id = self.resource_group_id + + resource_group_location = self.resource_group_location + + resource_group_name = self.resource_group_name + + subscription_id = self.subscription_id + + subscription_tenant_id = self.subscription_tenant_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if key_vault_id is not UNSET: + field_dict["key_vault_id"] = key_vault_id + if key_vault_name is not UNSET: + field_dict["key_vault_name"] = key_vault_name + if network_id is not UNSET: + field_dict["network_id"] = network_id + if network_name is not UNSET: + field_dict["network_name"] = network_name + if private_subnet_ids is not UNSET: + field_dict["private_subnet_ids"] = private_subnet_ids + if private_subnet_names is not UNSET: + field_dict["private_subnet_names"] = private_subnet_names + if public_subnet_ids is not UNSET: + field_dict["public_subnet_ids"] = public_subnet_ids + if public_subnet_names is not UNSET: + field_dict["public_subnet_names"] = public_subnet_names + if resource_group_id is not UNSET: + field_dict["resource_group_id"] = resource_group_id + if resource_group_location is not UNSET: + field_dict["resource_group_location"] = resource_group_location + if resource_group_name is not UNSET: + field_dict["resource_group_name"] = resource_group_name + if subscription_id is not UNSET: + field_dict["subscription_id"] = subscription_id + if subscription_tenant_id is not UNSET: + field_dict["subscription_tenant_id"] = subscription_tenant_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + key_vault_id = d.pop("key_vault_id", UNSET) + + key_vault_name = d.pop("key_vault_name", UNSET) + + network_id = d.pop("network_id", UNSET) + + network_name = d.pop("network_name", UNSET) + + private_subnet_ids = cast(list[str], d.pop("private_subnet_ids", UNSET)) + + private_subnet_names = cast(list[str], d.pop("private_subnet_names", UNSET)) + + public_subnet_ids = cast(list[str], d.pop("public_subnet_ids", UNSET)) + + public_subnet_names = cast(list[str], d.pop("public_subnet_names", UNSET)) + + resource_group_id = d.pop("resource_group_id", UNSET) + + resource_group_location = d.pop("resource_group_location", UNSET) + + resource_group_name = d.pop("resource_group_name", UNSET) + + subscription_id = d.pop("subscription_id", UNSET) + + subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) + + app_azure_stack_outputs = cls( + key_vault_id=key_vault_id, + key_vault_name=key_vault_name, + network_id=network_id, + network_name=network_name, + private_subnet_ids=private_subnet_ids, + private_subnet_names=private_subnet_names, + public_subnet_ids=public_subnet_ids, + public_subnet_names=public_subnet_names, + resource_group_id=resource_group_id, + resource_group_location=resource_group_location, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + subscription_tenant_id=subscription_tenant_id, + ) + + app_azure_stack_outputs.additional_properties = d + return app_azure_stack_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_cloud_platform.py b/nuon/models/app_cloud_platform.py new file mode 100644 index 00000000..7ebb2ab4 --- /dev/null +++ b/nuon/models/app_cloud_platform.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AppCloudPlatform(str, Enum): + AWS = "aws" + AZURE = "azure" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_cloud_platform_region.py b/nuon/models/app_cloud_platform_region.py new file mode 100644 index 00000000..29c5696c --- /dev/null +++ b/nuon/models/app_cloud_platform_region.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppCloudPlatformRegion") + + +@_attrs_define +class AppCloudPlatformRegion: + """ + Attributes: + display_name (Union[Unset, str]): + icon (Union[Unset, str]): + name (Union[Unset, str]): + value (Union[Unset, str]): + """ + + display_name: Union[Unset, str] = UNSET + icon: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + display_name = self.display_name + + icon = self.icon + + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if icon is not UNSET: + field_dict["icon"] = icon + if name is not UNSET: + field_dict["name"] = name + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + display_name = d.pop("display_name", UNSET) + + icon = d.pop("icon", UNSET) + + name = d.pop("name", UNSET) + + value = d.pop("value", UNSET) + + app_cloud_platform_region = cls( + display_name=display_name, + icon=icon, + name=name, + value=value, + ) + + app_cloud_platform_region.additional_properties = d + return app_cloud_platform_region + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component.py b/nuon/models/app_component.py new file mode 100644 index 00000000..55e6ab11 --- /dev/null +++ b/nuon/models/app_component.py @@ -0,0 +1,199 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_component_type import AppComponentType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_component_links import AppComponentLinks + + +T = TypeVar("T", bound="AppComponent") + + +@_attrs_define +class AppComponent: + """ + Attributes: + app_id (Union[Unset, str]): + config_versions (Union[Unset, int]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + dependencies (Union[Unset, list[str]]): + id (Union[Unset, str]): + links (Union[Unset, AppComponentLinks]): + name (Union[Unset, str]): + resolved_var_name (Union[Unset, str]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + type_ (Union[Unset, AppComponentType]): + updated_at (Union[Unset, str]): + var_name (Union[Unset, str]): + """ + + app_id: Union[Unset, str] = UNSET + config_versions: Union[Unset, int] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "AppComponentLinks"] = UNSET + name: Union[Unset, str] = UNSET + resolved_var_name: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + type_: Union[Unset, AppComponentType] = UNSET + updated_at: Union[Unset, str] = UNSET + var_name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_id = self.app_id + + config_versions = self.config_versions + + created_at = self.created_at + + created_by_id = self.created_by_id + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + id = self.id + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + name = self.name + + resolved_var_name = self.resolved_var_name + + status = self.status + + status_description = self.status_description + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + var_name = self.var_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_id is not UNSET: + field_dict["app_id"] = app_id + if config_versions is not UNSET: + field_dict["config_versions"] = config_versions + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + if name is not UNSET: + field_dict["name"] = name + if resolved_var_name is not UNSET: + field_dict["resolved_var_name"] = resolved_var_name + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if var_name is not UNSET: + field_dict["var_name"] = var_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_component_links import AppComponentLinks + + d = dict(src_dict) + app_id = d.pop("app_id", UNSET) + + config_versions = d.pop("config_versions", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppComponentLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppComponentLinks.from_dict(_links) + + name = d.pop("name", UNSET) + + resolved_var_name = d.pop("resolved_var_name", UNSET) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppComponentType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppComponentType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + var_name = d.pop("var_name", UNSET) + + app_component = cls( + app_id=app_id, + config_versions=config_versions, + created_at=created_at, + created_by_id=created_by_id, + dependencies=dependencies, + id=id, + links=links, + name=name, + resolved_var_name=resolved_var_name, + status=status, + status_description=status_description, + type_=type_, + updated_at=updated_at, + var_name=var_name, + ) + + app_component.additional_properties = d + return app_component + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component_build.py b/nuon/models/app_component_build.py new file mode 100644 index 00000000..429a8e47 --- /dev/null +++ b/nuon/models/app_component_build.py @@ -0,0 +1,313 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_component_config_connection import AppComponentConfigConnection + from ..models.app_component_release import AppComponentRelease + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_deploy import AppInstallDeploy + from ..models.app_log_stream import AppLogStream + from ..models.app_runner_job import AppRunnerJob + from ..models.app_vcs_connection_commit import AppVCSConnectionCommit + + +T = TypeVar("T", bound="AppComponentBuild") + + +@_attrs_define +class AppComponentBuild: + """ + Attributes: + checksum (Union[Unset, str]): checksum of our intermediate component config + component_config_connection (Union[Unset, AppComponentConfigConnection]): + component_config_connection_id (Union[Unset, str]): DEPRECATED: will retain the field to connect against the + last component config connection that set this build + component_config_version (Union[Unset, int]): + component_id (Union[Unset, str]): Read-only fields set on the object to de-nest data + component_name (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by (Union[Unset, AppAccount]): + created_by_id (Union[Unset, str]): + git_ref (Union[Unset, str]): + id (Union[Unset, str]): + install_deploys (Union[Unset, list['AppInstallDeploy']]): + log_stream (Union[Unset, AppLogStream]): + releases (Union[Unset, list['AppComponentRelease']]): + runner_job (Union[Unset, AppRunnerJob]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + status_v2 (Union[Unset, AppCompositeStatus]): + updated_at (Union[Unset, str]): + vcs_connection_commit (Union[Unset, AppVCSConnectionCommit]): + """ + + checksum: Union[Unset, str] = UNSET + component_config_connection: Union[Unset, "AppComponentConfigConnection"] = UNSET + component_config_connection_id: Union[Unset, str] = UNSET + component_config_version: Union[Unset, int] = UNSET + component_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by: Union[Unset, "AppAccount"] = UNSET + created_by_id: Union[Unset, str] = UNSET + git_ref: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET + log_stream: Union[Unset, "AppLogStream"] = UNSET + releases: Union[Unset, list["AppComponentRelease"]] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + status_v2: Union[Unset, "AppCompositeStatus"] = UNSET + updated_at: Union[Unset, str] = UNSET + vcs_connection_commit: Union[Unset, "AppVCSConnectionCommit"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + checksum = self.checksum + + component_config_connection: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.component_config_connection, Unset): + component_config_connection = self.component_config_connection.to_dict() + + component_config_connection_id = self.component_config_connection_id + + component_config_version = self.component_config_version + + component_id = self.component_id + + component_name = self.component_name + + created_at = self.created_at + + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_by_id = self.created_by_id + + git_ref = self.git_ref + + id = self.id + + install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_deploys, Unset): + install_deploys = [] + for install_deploys_item_data in self.install_deploys: + install_deploys_item = install_deploys_item_data.to_dict() + install_deploys.append(install_deploys_item) + + log_stream: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.log_stream, Unset): + log_stream = self.log_stream.to_dict() + + releases: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.releases, Unset): + releases = [] + for releases_item_data in self.releases: + releases_item = releases_item_data.to_dict() + releases.append(releases_item) + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + status = self.status + + status_description = self.status_description + + status_v2: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status_v2, Unset): + status_v2 = self.status_v2.to_dict() + + updated_at = self.updated_at + + vcs_connection_commit: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vcs_connection_commit, Unset): + vcs_connection_commit = self.vcs_connection_commit.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if checksum is not UNSET: + field_dict["checksum"] = checksum + if component_config_connection is not UNSET: + field_dict["component_config_connection"] = component_config_connection + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if component_config_version is not UNSET: + field_dict["component_config_version"] = component_config_version + if component_id is not UNSET: + field_dict["component_id"] = component_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if git_ref is not UNSET: + field_dict["git_ref"] = git_ref + if id is not UNSET: + field_dict["id"] = id + if install_deploys is not UNSET: + field_dict["install_deploys"] = install_deploys + if log_stream is not UNSET: + field_dict["log_stream"] = log_stream + if releases is not UNSET: + field_dict["releases"] = releases + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if status_v2 is not UNSET: + field_dict["status_v2"] = status_v2 + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vcs_connection_commit is not UNSET: + field_dict["vcs_connection_commit"] = vcs_connection_commit + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_component_config_connection import AppComponentConfigConnection + from ..models.app_component_release import AppComponentRelease + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_deploy import AppInstallDeploy + from ..models.app_log_stream import AppLogStream + from ..models.app_runner_job import AppRunnerJob + from ..models.app_vcs_connection_commit import AppVCSConnectionCommit + + d = dict(src_dict) + checksum = d.pop("checksum", UNSET) + + _component_config_connection = d.pop("component_config_connection", UNSET) + component_config_connection: Union[Unset, AppComponentConfigConnection] + if isinstance(_component_config_connection, Unset): + component_config_connection = UNSET + else: + component_config_connection = AppComponentConfigConnection.from_dict(_component_config_connection) + + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + component_config_version = d.pop("component_config_version", UNSET) + + component_id = d.pop("component_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + _created_by = d.pop("created_by", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_by_id = d.pop("created_by_id", UNSET) + + git_ref = d.pop("git_ref", UNSET) + + id = d.pop("id", UNSET) + + install_deploys = [] + _install_deploys = d.pop("install_deploys", UNSET) + for install_deploys_item_data in _install_deploys or []: + install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) + + install_deploys.append(install_deploys_item) + + _log_stream = d.pop("log_stream", UNSET) + log_stream: Union[Unset, AppLogStream] + if isinstance(_log_stream, Unset): + log_stream = UNSET + else: + log_stream = AppLogStream.from_dict(_log_stream) + + releases = [] + _releases = d.pop("releases", UNSET) + for releases_item_data in _releases or []: + releases_item = AppComponentRelease.from_dict(releases_item_data) + + releases.append(releases_item) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _status_v2 = d.pop("status_v2", UNSET) + status_v2: Union[Unset, AppCompositeStatus] + if isinstance(_status_v2, Unset): + status_v2 = UNSET + else: + status_v2 = AppCompositeStatus.from_dict(_status_v2) + + updated_at = d.pop("updated_at", UNSET) + + _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) + vcs_connection_commit: Union[Unset, AppVCSConnectionCommit] + if isinstance(_vcs_connection_commit, Unset): + vcs_connection_commit = UNSET + else: + vcs_connection_commit = AppVCSConnectionCommit.from_dict(_vcs_connection_commit) + + app_component_build = cls( + checksum=checksum, + component_config_connection=component_config_connection, + component_config_connection_id=component_config_connection_id, + component_config_version=component_config_version, + component_id=component_id, + component_name=component_name, + created_at=created_at, + created_by=created_by, + created_by_id=created_by_id, + git_ref=git_ref, + id=id, + install_deploys=install_deploys, + log_stream=log_stream, + releases=releases, + runner_job=runner_job, + status=status, + status_description=status_description, + status_v2=status_v2, + updated_at=updated_at, + vcs_connection_commit=vcs_connection_commit, + ) + + app_component_build.additional_properties = d + return app_component_build + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component_build_status.py b/nuon/models/app_component_build_status.py new file mode 100644 index 00000000..59bef120 --- /dev/null +++ b/nuon/models/app_component_build_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AppComponentBuildStatus(str, Enum): + ACTIVE = "active" + BUILDING = "building" + DELETING = "deleting" + ERROR = "error" + PLANNING = "planning" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_component_config_connection.py b/nuon/models/app_component_config_connection.py new file mode 100644 index 00000000..27aa75dd --- /dev/null +++ b/nuon/models/app_component_config_connection.py @@ -0,0 +1,321 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_component_type import AppComponentType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_docker_build_component_config import AppDockerBuildComponentConfig + from ..models.app_external_image_component_config import AppExternalImageComponentConfig + from ..models.app_helm_component_config import AppHelmComponentConfig + from ..models.app_job_component_config import AppJobComponentConfig + from ..models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig + from ..models.app_terraform_module_component_config import AppTerraformModuleComponentConfig + from ..models.refs_ref import RefsRef + + +T = TypeVar("T", bound="AppComponentConfigConnection") + + +@_attrs_define +class AppComponentConfigConnection: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_config_version (Union[Unset, int]): + checksum (Union[Unset, str]): + component_dependency_ids (Union[Unset, list[str]]): + component_id (Union[Unset, str]): + component_name (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + docker_build (Union[Unset, AppDockerBuildComponentConfig]): + drift_schedule (Union[Unset, str]): + external_image (Union[Unset, AppExternalImageComponentConfig]): + helm (Union[Unset, AppHelmComponentConfig]): + id (Union[Unset, str]): + job (Union[Unset, AppJobComponentConfig]): + kubernetes_manifest (Union[Unset, AppKubernetesManifestComponentConfig]): + references (Union[Unset, list[str]]): + refs (Union[Unset, list['RefsRef']]): + terraform_module (Union[Unset, AppTerraformModuleComponentConfig]): + type_ (Union[Unset, AppComponentType]): + updated_at (Union[Unset, str]): + version (Union[Unset, int]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_config_version: Union[Unset, int] = UNSET + checksum: Union[Unset, str] = UNSET + component_dependency_ids: Union[Unset, list[str]] = UNSET + component_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + docker_build: Union[Unset, "AppDockerBuildComponentConfig"] = UNSET + drift_schedule: Union[Unset, str] = UNSET + external_image: Union[Unset, "AppExternalImageComponentConfig"] = UNSET + helm: Union[Unset, "AppHelmComponentConfig"] = UNSET + id: Union[Unset, str] = UNSET + job: Union[Unset, "AppJobComponentConfig"] = UNSET + kubernetes_manifest: Union[Unset, "AppKubernetesManifestComponentConfig"] = UNSET + references: Union[Unset, list[str]] = UNSET + refs: Union[Unset, list["RefsRef"]] = UNSET + terraform_module: Union[Unset, "AppTerraformModuleComponentConfig"] = UNSET + type_: Union[Unset, AppComponentType] = UNSET + updated_at: Union[Unset, str] = UNSET + version: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_config_version = self.app_config_version + + checksum = self.checksum + + component_dependency_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.component_dependency_ids, Unset): + component_dependency_ids = self.component_dependency_ids + + component_id = self.component_id + + component_name = self.component_name + + created_at = self.created_at + + created_by_id = self.created_by_id + + docker_build: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.docker_build, Unset): + docker_build = self.docker_build.to_dict() + + drift_schedule = self.drift_schedule + + external_image: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.external_image, Unset): + external_image = self.external_image.to_dict() + + helm: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm, Unset): + helm = self.helm.to_dict() + + id = self.id + + job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.job, Unset): + job = self.job.to_dict() + + kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.kubernetes_manifest, Unset): + kubernetes_manifest = self.kubernetes_manifest.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + refs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.refs, Unset): + refs = [] + for refs_item_data in self.refs: + refs_item = refs_item_data.to_dict() + refs.append(refs_item) + + terraform_module: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_module, Unset): + terraform_module = self.terraform_module.to_dict() + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_config_version is not UNSET: + field_dict["app_config_version"] = app_config_version + if checksum is not UNSET: + field_dict["checksum"] = checksum + if component_dependency_ids is not UNSET: + field_dict["component_dependency_ids"] = component_dependency_ids + if component_id is not UNSET: + field_dict["component_id"] = component_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if docker_build is not UNSET: + field_dict["docker_build"] = docker_build + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule + if external_image is not UNSET: + field_dict["external_image"] = external_image + if helm is not UNSET: + field_dict["helm"] = helm + if id is not UNSET: + field_dict["id"] = id + if job is not UNSET: + field_dict["job"] = job + if kubernetes_manifest is not UNSET: + field_dict["kubernetes_manifest"] = kubernetes_manifest + if references is not UNSET: + field_dict["references"] = references + if refs is not UNSET: + field_dict["refs"] = refs + if terraform_module is not UNSET: + field_dict["terraform_module"] = terraform_module + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_docker_build_component_config import AppDockerBuildComponentConfig + from ..models.app_external_image_component_config import AppExternalImageComponentConfig + from ..models.app_helm_component_config import AppHelmComponentConfig + from ..models.app_job_component_config import AppJobComponentConfig + from ..models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig + from ..models.app_terraform_module_component_config import AppTerraformModuleComponentConfig + from ..models.refs_ref import RefsRef + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_config_version = d.pop("app_config_version", UNSET) + + checksum = d.pop("checksum", UNSET) + + component_dependency_ids = cast(list[str], d.pop("component_dependency_ids", UNSET)) + + component_id = d.pop("component_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _docker_build = d.pop("docker_build", UNSET) + docker_build: Union[Unset, AppDockerBuildComponentConfig] + if isinstance(_docker_build, Unset): + docker_build = UNSET + else: + docker_build = AppDockerBuildComponentConfig.from_dict(_docker_build) + + drift_schedule = d.pop("drift_schedule", UNSET) + + _external_image = d.pop("external_image", UNSET) + external_image: Union[Unset, AppExternalImageComponentConfig] + if isinstance(_external_image, Unset): + external_image = UNSET + else: + external_image = AppExternalImageComponentConfig.from_dict(_external_image) + + _helm = d.pop("helm", UNSET) + helm: Union[Unset, AppHelmComponentConfig] + if isinstance(_helm, Unset): + helm = UNSET + else: + helm = AppHelmComponentConfig.from_dict(_helm) + + id = d.pop("id", UNSET) + + _job = d.pop("job", UNSET) + job: Union[Unset, AppJobComponentConfig] + if isinstance(_job, Unset): + job = UNSET + else: + job = AppJobComponentConfig.from_dict(_job) + + _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) + kubernetes_manifest: Union[Unset, AppKubernetesManifestComponentConfig] + if isinstance(_kubernetes_manifest, Unset): + kubernetes_manifest = UNSET + else: + kubernetes_manifest = AppKubernetesManifestComponentConfig.from_dict(_kubernetes_manifest) + + references = cast(list[str], d.pop("references", UNSET)) + + refs = [] + _refs = d.pop("refs", UNSET) + for refs_item_data in _refs or []: + refs_item = RefsRef.from_dict(refs_item_data) + + refs.append(refs_item) + + _terraform_module = d.pop("terraform_module", UNSET) + terraform_module: Union[Unset, AppTerraformModuleComponentConfig] + if isinstance(_terraform_module, Unset): + terraform_module = UNSET + else: + terraform_module = AppTerraformModuleComponentConfig.from_dict(_terraform_module) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppComponentType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppComponentType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + version = d.pop("version", UNSET) + + app_component_config_connection = cls( + app_config_id=app_config_id, + app_config_version=app_config_version, + checksum=checksum, + component_dependency_ids=component_dependency_ids, + component_id=component_id, + component_name=component_name, + created_at=created_at, + created_by_id=created_by_id, + docker_build=docker_build, + drift_schedule=drift_schedule, + external_image=external_image, + helm=helm, + id=id, + job=job, + kubernetes_manifest=kubernetes_manifest, + references=references, + refs=refs, + terraform_module=terraform_module, + type_=type_, + updated_at=updated_at, + version=version, + ) + + app_component_config_connection.additional_properties = d + return app_component_config_connection + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component_links.py b/nuon/models/app_component_links.py new file mode 100644 index 00000000..cc8a64db --- /dev/null +++ b/nuon/models/app_component_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppComponentLinks") + + +@_attrs_define +class AppComponentLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_component_links = cls() + + app_component_links.additional_properties = d + return app_component_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component_release.py b/nuon/models/app_component_release.py new file mode 100644 index 00000000..586260b5 --- /dev/null +++ b/nuon/models/app_component_release.py @@ -0,0 +1,147 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_component_release_step import AppComponentReleaseStep + + +T = TypeVar("T", bound="AppComponentRelease") + + +@_attrs_define +class AppComponentRelease: + """ + Attributes: + build_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + release_steps (Union[Unset, list['AppComponentReleaseStep']]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + total_release_steps (Union[Unset, int]): + updated_at (Union[Unset, str]): + """ + + build_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + release_steps: Union[Unset, list["AppComponentReleaseStep"]] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + total_release_steps: Union[Unset, int] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_id = self.build_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + release_steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.release_steps, Unset): + release_steps = [] + for release_steps_item_data in self.release_steps: + release_steps_item = release_steps_item_data.to_dict() + release_steps.append(release_steps_item) + + status = self.status + + status_description = self.status_description + + total_release_steps = self.total_release_steps + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_id is not UNSET: + field_dict["build_id"] = build_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if release_steps is not UNSET: + field_dict["release_steps"] = release_steps + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if total_release_steps is not UNSET: + field_dict["total_release_steps"] = total_release_steps + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_component_release_step import AppComponentReleaseStep + + d = dict(src_dict) + build_id = d.pop("build_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + release_steps = [] + _release_steps = d.pop("release_steps", UNSET) + for release_steps_item_data in _release_steps or []: + release_steps_item = AppComponentReleaseStep.from_dict(release_steps_item_data) + + release_steps.append(release_steps_item) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + total_release_steps = d.pop("total_release_steps", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_component_release = cls( + build_id=build_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + release_steps=release_steps, + status=status, + status_description=status_description, + total_release_steps=total_release_steps, + updated_at=updated_at, + ) + + app_component_release.additional_properties = d + return app_component_release + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component_release_step.py b/nuon/models/app_component_release_step.py new file mode 100644 index 00000000..85a466e2 --- /dev/null +++ b/nuon/models/app_component_release_step.py @@ -0,0 +1,161 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_install_deploy import AppInstallDeploy + + +T = TypeVar("T", bound="AppComponentReleaseStep") + + +@_attrs_define +class AppComponentReleaseStep: + """ + Attributes: + component_release_id (Union[Unset, str]): parent release ID + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + delay (Union[Unset, str]): fields to control the delay of the individual step, as this is set based on the + parent strategy + id (Union[Unset, str]): + install_deploys (Union[Unset, list['AppInstallDeploy']]): + requested_install_ids (Union[Unset, list[str]]): When a step is created, a set of installs are targeted. + However, by the time the release step goes out, the + install might have been setup in any order of ways. + status (Union[Unset, str]): + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + component_release_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + delay: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET + requested_install_ids: Union[Unset, list[str]] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + component_release_id = self.component_release_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + delay = self.delay + + id = self.id + + install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_deploys, Unset): + install_deploys = [] + for install_deploys_item_data in self.install_deploys: + install_deploys_item = install_deploys_item_data.to_dict() + install_deploys.append(install_deploys_item) + + requested_install_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.requested_install_ids, Unset): + requested_install_ids = self.requested_install_ids + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if component_release_id is not UNSET: + field_dict["component_release_id"] = component_release_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if delay is not UNSET: + field_dict["delay"] = delay + if id is not UNSET: + field_dict["id"] = id + if install_deploys is not UNSET: + field_dict["install_deploys"] = install_deploys + if requested_install_ids is not UNSET: + field_dict["requested_install_ids"] = requested_install_ids + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_install_deploy import AppInstallDeploy + + d = dict(src_dict) + component_release_id = d.pop("component_release_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + delay = d.pop("delay", UNSET) + + id = d.pop("id", UNSET) + + install_deploys = [] + _install_deploys = d.pop("install_deploys", UNSET) + for install_deploys_item_data in _install_deploys or []: + install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) + + install_deploys.append(install_deploys_item) + + requested_install_ids = cast(list[str], d.pop("requested_install_ids", UNSET)) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_component_release_step = cls( + component_release_id=component_release_id, + created_at=created_at, + created_by_id=created_by_id, + delay=delay, + id=id, + install_deploys=install_deploys, + requested_install_ids=requested_install_ids, + status=status, + status_description=status_description, + updated_at=updated_at, + ) + + app_component_release_step.additional_properties = d + return app_component_release_step + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_component_type.py b/nuon/models/app_component_type.py new file mode 100644 index 00000000..8695141f --- /dev/null +++ b/nuon/models/app_component_type.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class AppComponentType(str, Enum): + DOCKER_BUILD = "docker_build" + EXTERNAL_IMAGE = "external_image" + HELM_CHART = "helm_chart" + JOB = "job" + KUBERNETES_MANIFEST = "kubernetes_manifest" + TERRAFORM_MODULE = "terraform_module" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_composite_status.py b/nuon/models/app_composite_status.py new file mode 100644 index 00000000..ad3b2ae0 --- /dev/null +++ b/nuon/models/app_composite_status.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_status import AppStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_composite_status_metadata import AppCompositeStatusMetadata + + +T = TypeVar("T", bound="AppCompositeStatus") + + +@_attrs_define +class AppCompositeStatus: + """ + Attributes: + created_at_ts (Union[Unset, int]): + created_by_id (Union[Unset, str]): + history (Union[Unset, list['AppCompositeStatus']]): + metadata (Union[Unset, AppCompositeStatusMetadata]): + status (Union[Unset, AppStatus]): + status_human_description (Union[Unset, str]): + """ + + created_at_ts: Union[Unset, int] = UNSET + created_by_id: Union[Unset, str] = UNSET + history: Union[Unset, list["AppCompositeStatus"]] = UNSET + metadata: Union[Unset, "AppCompositeStatusMetadata"] = UNSET + status: Union[Unset, AppStatus] = UNSET + status_human_description: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at_ts = self.created_at_ts + + created_by_id = self.created_by_id + + history: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.history, Unset): + history = [] + for history_item_data in self.history: + history_item = history_item_data.to_dict() + history.append(history_item) + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_human_description = self.status_human_description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at_ts is not UNSET: + field_dict["created_at_ts"] = created_at_ts + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if history is not UNSET: + field_dict["history"] = history + if metadata is not UNSET: + field_dict["metadata"] = metadata + if status is not UNSET: + field_dict["status"] = status + if status_human_description is not UNSET: + field_dict["status_human_description"] = status_human_description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_composite_status_metadata import AppCompositeStatusMetadata + + d = dict(src_dict) + created_at_ts = d.pop("created_at_ts", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + history = [] + _history = d.pop("history", UNSET) + for history_item_data in _history or []: + history_item = AppCompositeStatus.from_dict(history_item_data) + + history.append(history_item) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppCompositeStatusMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppCompositeStatusMetadata.from_dict(_metadata) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppStatus(_status) + + status_human_description = d.pop("status_human_description", UNSET) + + app_composite_status = cls( + created_at_ts=created_at_ts, + created_by_id=created_by_id, + history=history, + metadata=metadata, + status=status, + status_human_description=status_human_description, + ) + + app_composite_status.additional_properties = d + return app_composite_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/nuon/models/app_composite_status_metadata.py b/nuon/models/app_composite_status_metadata.py new file mode 100644 index 00000000..1c73c829 --- /dev/null +++ b/nuon/models/app_composite_status_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppCompositeStatusMetadata") + + +@_attrs_define +class AppCompositeStatusMetadata: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_composite_status_metadata = cls() + + app_composite_status_metadata.additional_properties = d + return app_composite_status_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/nuon/models/app_connected_github_vcs_config.py b/nuon/models/app_connected_github_vcs_config.py new file mode 100644 index 00000000..97f09815 --- /dev/null +++ b/nuon/models/app_connected_github_vcs_config.py @@ -0,0 +1,180 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_vcs_connection import AppVCSConnection + + +T = TypeVar("T", bound="AppConnectedGithubVCSConfig") + + +@_attrs_define +class AppConnectedGithubVCSConfig: + """ + Attributes: + branch (Union[Unset, str]): + component_config_id (Union[Unset, str]): parent component + component_config_type (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + directory (Union[Unset, str]): + id (Union[Unset, str]): + repo (Union[Unset, str]): + repo_name (Union[Unset, str]): + repo_owner (Union[Unset, str]): + updated_at (Union[Unset, str]): + vcs_connection (Union[Unset, AppVCSConnection]): + vcs_connection_id (Union[Unset, str]): + """ + + branch: Union[Unset, str] = UNSET + component_config_id: Union[Unset, str] = UNSET + component_config_type: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + directory: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + repo: Union[Unset, str] = UNSET + repo_name: Union[Unset, str] = UNSET + repo_owner: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + vcs_connection: Union[Unset, "AppVCSConnection"] = UNSET + vcs_connection_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + branch = self.branch + + component_config_id = self.component_config_id + + component_config_type = self.component_config_type + + created_at = self.created_at + + created_by_id = self.created_by_id + + directory = self.directory + + id = self.id + + repo = self.repo + + repo_name = self.repo_name + + repo_owner = self.repo_owner + + updated_at = self.updated_at + + vcs_connection: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vcs_connection, Unset): + vcs_connection = self.vcs_connection.to_dict() + + vcs_connection_id = self.vcs_connection_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if branch is not UNSET: + field_dict["branch"] = branch + if component_config_id is not UNSET: + field_dict["component_config_id"] = component_config_id + if component_config_type is not UNSET: + field_dict["component_config_type"] = component_config_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if directory is not UNSET: + field_dict["directory"] = directory + if id is not UNSET: + field_dict["id"] = id + if repo is not UNSET: + field_dict["repo"] = repo + if repo_name is not UNSET: + field_dict["repo_name"] = repo_name + if repo_owner is not UNSET: + field_dict["repo_owner"] = repo_owner + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vcs_connection is not UNSET: + field_dict["vcs_connection"] = vcs_connection + if vcs_connection_id is not UNSET: + field_dict["vcs_connection_id"] = vcs_connection_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_vcs_connection import AppVCSConnection + + d = dict(src_dict) + branch = d.pop("branch", UNSET) + + component_config_id = d.pop("component_config_id", UNSET) + + component_config_type = d.pop("component_config_type", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + directory = d.pop("directory", UNSET) + + id = d.pop("id", UNSET) + + repo = d.pop("repo", UNSET) + + repo_name = d.pop("repo_name", UNSET) + + repo_owner = d.pop("repo_owner", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _vcs_connection = d.pop("vcs_connection", UNSET) + vcs_connection: Union[Unset, AppVCSConnection] + if isinstance(_vcs_connection, Unset): + vcs_connection = UNSET + else: + vcs_connection = AppVCSConnection.from_dict(_vcs_connection) + + vcs_connection_id = d.pop("vcs_connection_id", UNSET) + + app_connected_github_vcs_config = cls( + branch=branch, + component_config_id=component_config_id, + component_config_type=component_config_type, + created_at=created_at, + created_by_id=created_by_id, + directory=directory, + id=id, + repo=repo, + repo_name=repo_name, + repo_owner=repo_owner, + updated_at=updated_at, + vcs_connection=vcs_connection, + vcs_connection_id=vcs_connection_id, + ) + + app_connected_github_vcs_config.additional_properties = d + return app_connected_github_vcs_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_docker_build_component_config.py b/nuon/models/app_docker_build_component_config.py new file mode 100644 index 00000000..21ad522b --- /dev/null +++ b/nuon/models/app_docker_build_component_config.py @@ -0,0 +1,182 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + + +T = TypeVar("T", bound="AppDockerBuildComponentConfig") + + +@_attrs_define +class AppDockerBuildComponentConfig: + """ + Attributes: + build_args (Union[Unset, list[str]]): + component_config_connection_id (Union[Unset, str]): value + connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + dockerfile (Union[Unset, str]): + env_vars (Union[Unset, AppDockerBuildComponentConfigEnvVars]): + id (Union[Unset, str]): + public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): + target (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + build_args: Union[Unset, list[str]] = UNSET + component_config_connection_id: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + dockerfile: Union[Unset, str] = UNSET + env_vars: Union[Unset, "AppDockerBuildComponentConfigEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET + target: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_args: Union[Unset, list[str]] = UNSET + if not isinstance(self.build_args, Unset): + build_args = self.build_args + + component_config_connection_id = self.component_config_connection_id + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + dockerfile = self.dockerfile + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + target = self.target + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_args is not UNSET: + field_dict["build_args"] = build_args + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if dockerfile is not UNSET: + field_dict["dockerfile"] = dockerfile + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if target is not UNSET: + field_dict["target"] = target + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + + d = dict(src_dict) + build_args = cast(list[str], d.pop("build_args", UNSET)) + + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + dockerfile = d.pop("dockerfile", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, AppDockerBuildComponentConfigEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = AppDockerBuildComponentConfigEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) + + target = d.pop("target", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_docker_build_component_config = cls( + build_args=build_args, + component_config_connection_id=component_config_connection_id, + connected_github_vcs_config=connected_github_vcs_config, + created_at=created_at, + created_by_id=created_by_id, + dockerfile=dockerfile, + env_vars=env_vars, + id=id, + public_git_vcs_config=public_git_vcs_config, + target=target, + updated_at=updated_at, + ) + + app_docker_build_component_config.additional_properties = d + return app_docker_build_component_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_docker_build_component_config_env_vars.py b/nuon/models/app_docker_build_component_config_env_vars.py new file mode 100644 index 00000000..f38c7ac6 --- /dev/null +++ b/nuon/models/app_docker_build_component_config_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppDockerBuildComponentConfigEnvVars") + + +@_attrs_define +class AppDockerBuildComponentConfigEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_docker_build_component_config_env_vars = cls() + + app_docker_build_component_config_env_vars.additional_properties = d + return app_docker_build_component_config_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_drifted_object.py b/nuon/models/app_drifted_object.py new file mode 100644 index 00000000..980fe74e --- /dev/null +++ b/nuon/models/app_drifted_object.py @@ -0,0 +1,140 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppDriftedObject") + + +@_attrs_define +class AppDriftedObject: + """ + Attributes: + app_sandbox_config_id (Union[Unset, str]): + component_build_id (Union[Unset, str]): + component_name (Union[Unset, str]): + install_component_id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_sandbox_id (Union[Unset, str]): + install_workflow_id (Union[Unset, str]): + org_id (Union[Unset, str]): + target_id (Union[Unset, str]): + target_type (Union[Unset, str]): These fields will be populated from the drifts_view + """ + + app_sandbox_config_id: Union[Unset, str] = UNSET + component_build_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + install_component_id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_sandbox_id: Union[Unset, str] = UNSET + install_workflow_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + target_id: Union[Unset, str] = UNSET + target_type: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_sandbox_config_id = self.app_sandbox_config_id + + component_build_id = self.component_build_id + + component_name = self.component_name + + install_component_id = self.install_component_id + + install_id = self.install_id + + install_sandbox_id = self.install_sandbox_id + + install_workflow_id = self.install_workflow_id + + org_id = self.org_id + + target_id = self.target_id + + target_type = self.target_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_sandbox_config_id is not UNSET: + field_dict["app_sandbox_config_id"] = app_sandbox_config_id + if component_build_id is not UNSET: + field_dict["component_build_id"] = component_build_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if install_component_id is not UNSET: + field_dict["install_component_id"] = install_component_id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_sandbox_id is not UNSET: + field_dict["install_sandbox_id"] = install_sandbox_id + if install_workflow_id is not UNSET: + field_dict["install_workflow_id"] = install_workflow_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if target_id is not UNSET: + field_dict["target_id"] = target_id + if target_type is not UNSET: + field_dict["target_type"] = target_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_sandbox_config_id = d.pop("app_sandbox_config_id", UNSET) + + component_build_id = d.pop("component_build_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + install_component_id = d.pop("install_component_id", UNSET) + + install_id = d.pop("install_id", UNSET) + + install_sandbox_id = d.pop("install_sandbox_id", UNSET) + + install_workflow_id = d.pop("install_workflow_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + target_id = d.pop("target_id", UNSET) + + target_type = d.pop("target_type", UNSET) + + app_drifted_object = cls( + app_sandbox_config_id=app_sandbox_config_id, + component_build_id=component_build_id, + component_name=component_name, + install_component_id=install_component_id, + install_id=install_id, + install_sandbox_id=install_sandbox_id, + install_workflow_id=install_workflow_id, + org_id=org_id, + target_id=target_id, + target_type=target_type, + ) + + app_drifted_object.additional_properties = d + return app_drifted_object + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_external_image_component_config.py b/nuon/models/app_external_image_component_config.py new file mode 100644 index 00000000..fd74a815 --- /dev/null +++ b/nuon/models/app_external_image_component_config.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_awsecr_image_config import AppAWSECRImageConfig + + +T = TypeVar("T", bound="AppExternalImageComponentConfig") + + +@_attrs_define +class AppExternalImageComponentConfig: + """ + Attributes: + aws_ecr_image_config (Union[Unset, AppAWSECRImageConfig]): + component_config_connection_id (Union[Unset, str]): value + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + image_url (Union[Unset, str]): + tag (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + aws_ecr_image_config: Union[Unset, "AppAWSECRImageConfig"] = UNSET + component_config_connection_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + image_url: Union[Unset, str] = UNSET + tag: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_ecr_image_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_ecr_image_config, Unset): + aws_ecr_image_config = self.aws_ecr_image_config.to_dict() + + component_config_connection_id = self.component_config_connection_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + image_url = self.image_url + + tag = self.tag + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_ecr_image_config is not UNSET: + field_dict["aws_ecr_image_config"] = aws_ecr_image_config + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if image_url is not UNSET: + field_dict["image_url"] = image_url + if tag is not UNSET: + field_dict["tag"] = tag + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_awsecr_image_config import AppAWSECRImageConfig + + d = dict(src_dict) + _aws_ecr_image_config = d.pop("aws_ecr_image_config", UNSET) + aws_ecr_image_config: Union[Unset, AppAWSECRImageConfig] + if isinstance(_aws_ecr_image_config, Unset): + aws_ecr_image_config = UNSET + else: + aws_ecr_image_config = AppAWSECRImageConfig.from_dict(_aws_ecr_image_config) + + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + image_url = d.pop("image_url", UNSET) + + tag = d.pop("tag", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_external_image_component_config = cls( + aws_ecr_image_config=aws_ecr_image_config, + component_config_connection_id=component_config_connection_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + image_url=image_url, + tag=tag, + updated_at=updated_at, + ) + + app_external_image_component_config.additional_properties = d + return app_external_image_component_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_helm_chart.py b/nuon/models/app_helm_chart.py new file mode 100644 index 00000000..ac081a0a --- /dev/null +++ b/nuon/models/app_helm_chart.py @@ -0,0 +1,138 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_helm_release import AppHelmRelease + + +T = TypeVar("T", bound="AppHelmChart") + + +@_attrs_define +class AppHelmChart: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + helm_releases (Union[Unset, list['AppHelmRelease']]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + helm_releases: Union[Unset, list["AppHelmRelease"]] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + helm_releases: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.helm_releases, Unset): + helm_releases = [] + for helm_releases_item_data in self.helm_releases: + helm_releases_item = helm_releases_item_data.to_dict() + helm_releases.append(helm_releases_item) + + id = self.id + + org_id = self.org_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if helm_releases is not UNSET: + field_dict["helmReleases"] = helm_releases + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_helm_release import AppHelmRelease + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + helm_releases = [] + _helm_releases = d.pop("helmReleases", UNSET) + for helm_releases_item_data in _helm_releases or []: + helm_releases_item = AppHelmRelease.from_dict(helm_releases_item_data) + + helm_releases.append(helm_releases_item) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_helm_chart = cls( + created_at=created_at, + created_by_id=created_by_id, + helm_releases=helm_releases, + id=id, + org_id=org_id, + owner_id=owner_id, + owner_type=owner_type, + updated_at=updated_at, + ) + + app_helm_chart.additional_properties = d + return app_helm_chart + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_helm_component_config.py b/nuon/models/app_helm_component_config.py new file mode 100644 index 00000000..e348bea4 --- /dev/null +++ b/nuon/models/app_helm_component_config.py @@ -0,0 +1,218 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_helm_component_config_values import AppHelmComponentConfigValues + from ..models.app_helm_config import AppHelmConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + + +T = TypeVar("T", bound="AppHelmComponentConfig") + + +@_attrs_define +class AppHelmComponentConfig: + """ + Attributes: + chart_name (Union[Unset, str]): Helm specific configurations + component_config_connection_id (Union[Unset, str]): parent reference + connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + helm_config_json (Union[Unset, AppHelmConfig]): + id (Union[Unset, str]): + namespace (Union[Unset, str]): + public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): + storage_driver (Union[Unset, str]): + take_ownership (Union[Unset, bool]): Newer config fields that we don't need a column for + updated_at (Union[Unset, str]): + values (Union[Unset, AppHelmComponentConfigValues]): + values_files (Union[Unset, list[str]]): + """ + + chart_name: Union[Unset, str] = UNSET + component_config_connection_id: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + helm_config_json: Union[Unset, "AppHelmConfig"] = UNSET + id: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET + storage_driver: Union[Unset, str] = UNSET + take_ownership: Union[Unset, bool] = UNSET + updated_at: Union[Unset, str] = UNSET + values: Union[Unset, "AppHelmComponentConfigValues"] = UNSET + values_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + chart_name = self.chart_name + + component_config_connection_id = self.component_config_connection_id + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + helm_config_json: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm_config_json, Unset): + helm_config_json = self.helm_config_json.to_dict() + + id = self.id + + namespace = self.namespace + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + storage_driver = self.storage_driver + + take_ownership = self.take_ownership + + updated_at = self.updated_at + + values: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.values, Unset): + values = self.values.to_dict() + + values_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.values_files, Unset): + values_files = self.values_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if chart_name is not UNSET: + field_dict["chart_name"] = chart_name + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if helm_config_json is not UNSET: + field_dict["helm_config_json"] = helm_config_json + if id is not UNSET: + field_dict["id"] = id + if namespace is not UNSET: + field_dict["namespace"] = namespace + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if storage_driver is not UNSET: + field_dict["storage_driver"] = storage_driver + if take_ownership is not UNSET: + field_dict["take_ownership"] = take_ownership + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if values is not UNSET: + field_dict["values"] = values + if values_files is not UNSET: + field_dict["values_files"] = values_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_helm_component_config_values import AppHelmComponentConfigValues + from ..models.app_helm_config import AppHelmConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + + d = dict(src_dict) + chart_name = d.pop("chart_name", UNSET) + + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _helm_config_json = d.pop("helm_config_json", UNSET) + helm_config_json: Union[Unset, AppHelmConfig] + if isinstance(_helm_config_json, Unset): + helm_config_json = UNSET + else: + helm_config_json = AppHelmConfig.from_dict(_helm_config_json) + + id = d.pop("id", UNSET) + + namespace = d.pop("namespace", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) + + storage_driver = d.pop("storage_driver", UNSET) + + take_ownership = d.pop("take_ownership", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _values = d.pop("values", UNSET) + values: Union[Unset, AppHelmComponentConfigValues] + if isinstance(_values, Unset): + values = UNSET + else: + values = AppHelmComponentConfigValues.from_dict(_values) + + values_files = cast(list[str], d.pop("values_files", UNSET)) + + app_helm_component_config = cls( + chart_name=chart_name, + component_config_connection_id=component_config_connection_id, + connected_github_vcs_config=connected_github_vcs_config, + created_at=created_at, + created_by_id=created_by_id, + helm_config_json=helm_config_json, + id=id, + namespace=namespace, + public_git_vcs_config=public_git_vcs_config, + storage_driver=storage_driver, + take_ownership=take_ownership, + updated_at=updated_at, + values=values, + values_files=values_files, + ) + + app_helm_component_config.additional_properties = d + return app_helm_component_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_helm_component_config_values.py b/nuon/models/app_helm_component_config_values.py new file mode 100644 index 00000000..03bfdc78 --- /dev/null +++ b/nuon/models/app_helm_component_config_values.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppHelmComponentConfigValues") + + +@_attrs_define +class AppHelmComponentConfigValues: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_helm_component_config_values = cls() + + app_helm_component_config_values.additional_properties = d + return app_helm_component_config_values + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_helm_config.py b/nuon/models/app_helm_config.py new file mode 100644 index 00000000..3c804fc6 --- /dev/null +++ b/nuon/models/app_helm_config.py @@ -0,0 +1,119 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_helm_config_values import AppHelmConfigValues + + +T = TypeVar("T", bound="AppHelmConfig") + + +@_attrs_define +class AppHelmConfig: + """ + Attributes: + chart_name (Union[Unset, str]): + namespace (Union[Unset, str]): + storage_driver (Union[Unset, str]): + take_ownership (Union[Unset, bool]): Newer fields that we don't need to store as columns in the database + values (Union[Unset, AppHelmConfigValues]): + values_files (Union[Unset, list[str]]): + """ + + chart_name: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + storage_driver: Union[Unset, str] = UNSET + take_ownership: Union[Unset, bool] = UNSET + values: Union[Unset, "AppHelmConfigValues"] = UNSET + values_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + chart_name = self.chart_name + + namespace = self.namespace + + storage_driver = self.storage_driver + + take_ownership = self.take_ownership + + values: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.values, Unset): + values = self.values.to_dict() + + values_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.values_files, Unset): + values_files = self.values_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if chart_name is not UNSET: + field_dict["chart_name"] = chart_name + if namespace is not UNSET: + field_dict["namespace"] = namespace + if storage_driver is not UNSET: + field_dict["storage_driver"] = storage_driver + if take_ownership is not UNSET: + field_dict["take_ownership"] = take_ownership + if values is not UNSET: + field_dict["values"] = values + if values_files is not UNSET: + field_dict["values_files"] = values_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_helm_config_values import AppHelmConfigValues + + d = dict(src_dict) + chart_name = d.pop("chart_name", UNSET) + + namespace = d.pop("namespace", UNSET) + + storage_driver = d.pop("storage_driver", UNSET) + + take_ownership = d.pop("take_ownership", UNSET) + + _values = d.pop("values", UNSET) + values: Union[Unset, AppHelmConfigValues] + if isinstance(_values, Unset): + values = UNSET + else: + values = AppHelmConfigValues.from_dict(_values) + + values_files = cast(list[str], d.pop("values_files", UNSET)) + + app_helm_config = cls( + chart_name=chart_name, + namespace=namespace, + storage_driver=storage_driver, + take_ownership=take_ownership, + values=values, + values_files=values_files, + ) + + app_helm_config.additional_properties = d + return app_helm_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_helm_config_values.py b/nuon/models/app_helm_config_values.py new file mode 100644 index 00000000..6852c63b --- /dev/null +++ b/nuon/models/app_helm_config_values.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppHelmConfigValues") + + +@_attrs_define +class AppHelmConfigValues: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_helm_config_values = cls() + + app_helm_config_values.additional_properties = d + return app_helm_config_values + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_helm_release.py b/nuon/models/app_helm_release.py new file mode 100644 index 00000000..08d72543 --- /dev/null +++ b/nuon/models/app_helm_release.py @@ -0,0 +1,211 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_helm_chart import AppHelmChart + from ..models.app_json_map import AppJSONMap + + +T = TypeVar("T", bound="AppHelmRelease") + + +@_attrs_define +class AppHelmRelease: + """ + Attributes: + body (Union[Unset, str]): The rspb.Release body, as a base64-encoded string + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + helm_chart (Union[Unset, AppHelmChart]): + helm_chart_id (Union[Unset, str]): + key (Union[Unset, str]): + labels (Union[Unset, AppJSONMap]): + name (Union[Unset, str]): Release "labels" that can be used as filters in the storage.Query(labels + map[string]string) + we implemented. Note that allowing Helm users to filter against new dimensions will require a + new migration to be added, and the Create and/or update functions to be updated accordingly. + namespace (Union[Unset, str]): + org_id (Union[Unset, str]): + owner (Union[Unset, str]): + status (Union[Unset, str]): + type_ (Union[Unset, str]): See + https://github.com/helm/helm/blob/c9fe3d118caec699eb2565df9838673af379ce12/pkg/storage/driver/secrets.go#L231 + updated_at (Union[Unset, str]): + version (Union[Unset, int]): + """ + + body: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + helm_chart: Union[Unset, "AppHelmChart"] = UNSET + helm_chart_id: Union[Unset, str] = UNSET + key: Union[Unset, str] = UNSET + labels: Union[Unset, "AppJSONMap"] = UNSET + name: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + owner: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + version: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + body = self.body + + created_at = self.created_at + + created_by_id = self.created_by_id + + helm_chart: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm_chart, Unset): + helm_chart = self.helm_chart.to_dict() + + helm_chart_id = self.helm_chart_id + + key = self.key + + labels: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels.to_dict() + + name = self.name + + namespace = self.namespace + + org_id = self.org_id + + owner = self.owner + + status = self.status + + type_ = self.type_ + + updated_at = self.updated_at + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if body is not UNSET: + field_dict["body"] = body + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if helm_chart is not UNSET: + field_dict["helmChart"] = helm_chart + if helm_chart_id is not UNSET: + field_dict["helmChartID"] = helm_chart_id + if key is not UNSET: + field_dict["key"] = key + if labels is not UNSET: + field_dict["labels"] = labels + if name is not UNSET: + field_dict["name"] = name + if namespace is not UNSET: + field_dict["namespace"] = namespace + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner is not UNSET: + field_dict["owner"] = owner + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_helm_chart import AppHelmChart + from ..models.app_json_map import AppJSONMap + + d = dict(src_dict) + body = d.pop("body", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _helm_chart = d.pop("helmChart", UNSET) + helm_chart: Union[Unset, AppHelmChart] + if isinstance(_helm_chart, Unset): + helm_chart = UNSET + else: + helm_chart = AppHelmChart.from_dict(_helm_chart) + + helm_chart_id = d.pop("helmChartID", UNSET) + + key = d.pop("key", UNSET) + + _labels = d.pop("labels", UNSET) + labels: Union[Unset, AppJSONMap] + if isinstance(_labels, Unset): + labels = UNSET + else: + labels = AppJSONMap.from_dict(_labels) + + name = d.pop("name", UNSET) + + namespace = d.pop("namespace", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner = d.pop("owner", UNSET) + + status = d.pop("status", UNSET) + + type_ = d.pop("type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + version = d.pop("version", UNSET) + + app_helm_release = cls( + body=body, + created_at=created_at, + created_by_id=created_by_id, + helm_chart=helm_chart, + helm_chart_id=helm_chart_id, + key=key, + labels=labels, + name=name, + namespace=namespace, + org_id=org_id, + owner=owner, + status=status, + type_=type_, + updated_at=updated_at, + version=version, + ) + + app_helm_release.additional_properties = d + return app_helm_release + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install.py b/nuon/models/app_install.py new file mode 100644 index 00000000..99685c8a --- /dev/null +++ b/nuon/models/app_install.py @@ -0,0 +1,573 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app_runner_config import AppAppRunnerConfig + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_aws_account import AppAWSAccount + from ..models.app_azure_account import AppAzureAccount + from ..models.app_drifted_object import AppDriftedObject + from ..models.app_install_action_workflow import AppInstallActionWorkflow + from ..models.app_install_component import AppInstallComponent + from ..models.app_install_component_statuses import AppInstallComponentStatuses + from ..models.app_install_config import AppInstallConfig + from ..models.app_install_event import AppInstallEvent + from ..models.app_install_inputs import AppInstallInputs + from ..models.app_install_links import AppInstallLinks + from ..models.app_install_metadata import AppInstallMetadata + from ..models.app_install_sandbox import AppInstallSandbox + from ..models.app_install_sandbox_run import AppInstallSandboxRun + from ..models.app_install_stack import AppInstallStack + from ..models.app_install_state import AppInstallState + from ..models.app_workflow import AppWorkflow + + +T = TypeVar("T", bound="AppInstall") + + +@_attrs_define +class AppInstall: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + app_runner_config (Union[Unset, AppAppRunnerConfig]): + app_sandbox_config (Union[Unset, AppAppSandboxConfig]): + aws_account (Union[Unset, AppAWSAccount]): + azure_account (Union[Unset, AppAzureAccount]): + cloud_platform (Union[Unset, str]): + component_statuses (Union[Unset, AppInstallComponentStatuses]): + composite_component_status (Union[Unset, str]): + composite_component_status_description (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + drifted_objects (Union[Unset, list['AppDriftedObject']]): + id (Union[Unset, str]): + install_action_workflows (Union[Unset, list['AppInstallActionWorkflow']]): + install_components (Union[Unset, list['AppInstallComponent']]): + install_config (Union[Unset, AppInstallConfig]): + install_events (Union[Unset, list['AppInstallEvent']]): + install_inputs (Union[Unset, list['AppInstallInputs']]): + install_number (Union[Unset, int]): + install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): + install_stack (Union[Unset, AppInstallStack]): + install_states (Union[Unset, list['AppInstallState']]): + links (Union[Unset, AppInstallLinks]): + metadata (Union[Unset, AppInstallMetadata]): + name (Union[Unset, str]): + runner_id (Union[Unset, str]): + runner_status (Union[Unset, str]): + runner_status_description (Union[Unset, str]): + runner_type (Union[Unset, str]): + sandbox (Union[Unset, AppInstallSandbox]): + sandbox_status (Union[Unset, str]): + sandbox_status_description (Union[Unset, str]): + status (Union[Unset, str]): TODO(jm): deprecate these fields once the terraform provider has been updated + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + workflows (Union[Unset, list['AppWorkflow']]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + app_runner_config: Union[Unset, "AppAppRunnerConfig"] = UNSET + app_sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET + aws_account: Union[Unset, "AppAWSAccount"] = UNSET + azure_account: Union[Unset, "AppAzureAccount"] = UNSET + cloud_platform: Union[Unset, str] = UNSET + component_statuses: Union[Unset, "AppInstallComponentStatuses"] = UNSET + composite_component_status: Union[Unset, str] = UNSET + composite_component_status_description: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + drifted_objects: Union[Unset, list["AppDriftedObject"]] = UNSET + id: Union[Unset, str] = UNSET + install_action_workflows: Union[Unset, list["AppInstallActionWorkflow"]] = UNSET + install_components: Union[Unset, list["AppInstallComponent"]] = UNSET + install_config: Union[Unset, "AppInstallConfig"] = UNSET + install_events: Union[Unset, list["AppInstallEvent"]] = UNSET + install_inputs: Union[Unset, list["AppInstallInputs"]] = UNSET + install_number: Union[Unset, int] = UNSET + install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET + install_stack: Union[Unset, "AppInstallStack"] = UNSET + install_states: Union[Unset, list["AppInstallState"]] = UNSET + links: Union[Unset, "AppInstallLinks"] = UNSET + metadata: Union[Unset, "AppInstallMetadata"] = UNSET + name: Union[Unset, str] = UNSET + runner_id: Union[Unset, str] = UNSET + runner_status: Union[Unset, str] = UNSET + runner_status_description: Union[Unset, str] = UNSET + runner_type: Union[Unset, str] = UNSET + sandbox: Union[Unset, "AppInstallSandbox"] = UNSET + sandbox_status: Union[Unset, str] = UNSET + sandbox_status_description: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + workflows: Union[Unset, list["AppWorkflow"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + app_runner_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.app_runner_config, Unset): + app_runner_config = self.app_runner_config.to_dict() + + app_sandbox_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.app_sandbox_config, Unset): + app_sandbox_config = self.app_sandbox_config.to_dict() + + aws_account: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_account, Unset): + aws_account = self.aws_account.to_dict() + + azure_account: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_account, Unset): + azure_account = self.azure_account.to_dict() + + cloud_platform = self.cloud_platform + + component_statuses: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.component_statuses, Unset): + component_statuses = self.component_statuses.to_dict() + + composite_component_status = self.composite_component_status + + composite_component_status_description = self.composite_component_status_description + + created_at = self.created_at + + created_by_id = self.created_by_id + + drifted_objects: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.drifted_objects, Unset): + drifted_objects = [] + for drifted_objects_item_data in self.drifted_objects: + drifted_objects_item = drifted_objects_item_data.to_dict() + drifted_objects.append(drifted_objects_item) + + id = self.id + + install_action_workflows: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_action_workflows, Unset): + install_action_workflows = [] + for install_action_workflows_item_data in self.install_action_workflows: + install_action_workflows_item = install_action_workflows_item_data.to_dict() + install_action_workflows.append(install_action_workflows_item) + + install_components: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_components, Unset): + install_components = [] + for install_components_item_data in self.install_components: + install_components_item = install_components_item_data.to_dict() + install_components.append(install_components_item) + + install_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_config, Unset): + install_config = self.install_config.to_dict() + + install_events: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_events, Unset): + install_events = [] + for install_events_item_data in self.install_events: + install_events_item = install_events_item_data.to_dict() + install_events.append(install_events_item) + + install_inputs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_inputs, Unset): + install_inputs = [] + for install_inputs_item_data in self.install_inputs: + install_inputs_item = install_inputs_item_data.to_dict() + install_inputs.append(install_inputs_item) + + install_number = self.install_number + + install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_sandbox_runs, Unset): + install_sandbox_runs = [] + for install_sandbox_runs_item_data in self.install_sandbox_runs: + install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() + install_sandbox_runs.append(install_sandbox_runs_item) + + install_stack: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_stack, Unset): + install_stack = self.install_stack.to_dict() + + install_states: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_states, Unset): + install_states = [] + for install_states_item_data in self.install_states: + install_states_item = install_states_item_data.to_dict() + install_states.append(install_states_item) + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + name = self.name + + runner_id = self.runner_id + + runner_status = self.runner_status + + runner_status_description = self.runner_status_description + + runner_type = self.runner_type + + sandbox: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox, Unset): + sandbox = self.sandbox.to_dict() + + sandbox_status = self.sandbox_status + + sandbox_status_description = self.sandbox_status_description + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + workflows: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.workflows, Unset): + workflows = [] + for workflows_item_data in self.workflows: + workflows_item = workflows_item_data.to_dict() + workflows.append(workflows_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if app_runner_config is not UNSET: + field_dict["app_runner_config"] = app_runner_config + if app_sandbox_config is not UNSET: + field_dict["app_sandbox_config"] = app_sandbox_config + if aws_account is not UNSET: + field_dict["aws_account"] = aws_account + if azure_account is not UNSET: + field_dict["azure_account"] = azure_account + if cloud_platform is not UNSET: + field_dict["cloud_platform"] = cloud_platform + if component_statuses is not UNSET: + field_dict["component_statuses"] = component_statuses + if composite_component_status is not UNSET: + field_dict["composite_component_status"] = composite_component_status + if composite_component_status_description is not UNSET: + field_dict["composite_component_status_description"] = composite_component_status_description + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if drifted_objects is not UNSET: + field_dict["drifted_objects"] = drifted_objects + if id is not UNSET: + field_dict["id"] = id + if install_action_workflows is not UNSET: + field_dict["install_action_workflows"] = install_action_workflows + if install_components is not UNSET: + field_dict["install_components"] = install_components + if install_config is not UNSET: + field_dict["install_config"] = install_config + if install_events is not UNSET: + field_dict["install_events"] = install_events + if install_inputs is not UNSET: + field_dict["install_inputs"] = install_inputs + if install_number is not UNSET: + field_dict["install_number"] = install_number + if install_sandbox_runs is not UNSET: + field_dict["install_sandbox_runs"] = install_sandbox_runs + if install_stack is not UNSET: + field_dict["install_stack"] = install_stack + if install_states is not UNSET: + field_dict["install_states"] = install_states + if links is not UNSET: + field_dict["links"] = links + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if runner_status is not UNSET: + field_dict["runner_status"] = runner_status + if runner_status_description is not UNSET: + field_dict["runner_status_description"] = runner_status_description + if runner_type is not UNSET: + field_dict["runner_type"] = runner_type + if sandbox is not UNSET: + field_dict["sandbox"] = sandbox + if sandbox_status is not UNSET: + field_dict["sandbox_status"] = sandbox_status + if sandbox_status_description is not UNSET: + field_dict["sandbox_status_description"] = sandbox_status_description + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflows is not UNSET: + field_dict["workflows"] = workflows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_runner_config import AppAppRunnerConfig + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_aws_account import AppAWSAccount + from ..models.app_azure_account import AppAzureAccount + from ..models.app_drifted_object import AppDriftedObject + from ..models.app_install_action_workflow import AppInstallActionWorkflow + from ..models.app_install_component import AppInstallComponent + from ..models.app_install_component_statuses import AppInstallComponentStatuses + from ..models.app_install_config import AppInstallConfig + from ..models.app_install_event import AppInstallEvent + from ..models.app_install_inputs import AppInstallInputs + from ..models.app_install_links import AppInstallLinks + from ..models.app_install_metadata import AppInstallMetadata + from ..models.app_install_sandbox import AppInstallSandbox + from ..models.app_install_sandbox_run import AppInstallSandboxRun + from ..models.app_install_stack import AppInstallStack + from ..models.app_install_state import AppInstallState + from ..models.app_workflow import AppWorkflow + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + _app_runner_config = d.pop("app_runner_config", UNSET) + app_runner_config: Union[Unset, AppAppRunnerConfig] + if isinstance(_app_runner_config, Unset): + app_runner_config = UNSET + else: + app_runner_config = AppAppRunnerConfig.from_dict(_app_runner_config) + + _app_sandbox_config = d.pop("app_sandbox_config", UNSET) + app_sandbox_config: Union[Unset, AppAppSandboxConfig] + if isinstance(_app_sandbox_config, Unset): + app_sandbox_config = UNSET + else: + app_sandbox_config = AppAppSandboxConfig.from_dict(_app_sandbox_config) + + _aws_account = d.pop("aws_account", UNSET) + aws_account: Union[Unset, AppAWSAccount] + if isinstance(_aws_account, Unset): + aws_account = UNSET + else: + aws_account = AppAWSAccount.from_dict(_aws_account) + + _azure_account = d.pop("azure_account", UNSET) + azure_account: Union[Unset, AppAzureAccount] + if isinstance(_azure_account, Unset): + azure_account = UNSET + else: + azure_account = AppAzureAccount.from_dict(_azure_account) + + cloud_platform = d.pop("cloud_platform", UNSET) + + _component_statuses = d.pop("component_statuses", UNSET) + component_statuses: Union[Unset, AppInstallComponentStatuses] + if isinstance(_component_statuses, Unset): + component_statuses = UNSET + else: + component_statuses = AppInstallComponentStatuses.from_dict(_component_statuses) + + composite_component_status = d.pop("composite_component_status", UNSET) + + composite_component_status_description = d.pop("composite_component_status_description", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + drifted_objects = [] + _drifted_objects = d.pop("drifted_objects", UNSET) + for drifted_objects_item_data in _drifted_objects or []: + drifted_objects_item = AppDriftedObject.from_dict(drifted_objects_item_data) + + drifted_objects.append(drifted_objects_item) + + id = d.pop("id", UNSET) + + install_action_workflows = [] + _install_action_workflows = d.pop("install_action_workflows", UNSET) + for install_action_workflows_item_data in _install_action_workflows or []: + install_action_workflows_item = AppInstallActionWorkflow.from_dict(install_action_workflows_item_data) + + install_action_workflows.append(install_action_workflows_item) + + install_components = [] + _install_components = d.pop("install_components", UNSET) + for install_components_item_data in _install_components or []: + install_components_item = AppInstallComponent.from_dict(install_components_item_data) + + install_components.append(install_components_item) + + _install_config = d.pop("install_config", UNSET) + install_config: Union[Unset, AppInstallConfig] + if isinstance(_install_config, Unset): + install_config = UNSET + else: + install_config = AppInstallConfig.from_dict(_install_config) + + install_events = [] + _install_events = d.pop("install_events", UNSET) + for install_events_item_data in _install_events or []: + install_events_item = AppInstallEvent.from_dict(install_events_item_data) + + install_events.append(install_events_item) + + install_inputs = [] + _install_inputs = d.pop("install_inputs", UNSET) + for install_inputs_item_data in _install_inputs or []: + install_inputs_item = AppInstallInputs.from_dict(install_inputs_item_data) + + install_inputs.append(install_inputs_item) + + install_number = d.pop("install_number", UNSET) + + install_sandbox_runs = [] + _install_sandbox_runs = d.pop("install_sandbox_runs", UNSET) + for install_sandbox_runs_item_data in _install_sandbox_runs or []: + install_sandbox_runs_item = AppInstallSandboxRun.from_dict(install_sandbox_runs_item_data) + + install_sandbox_runs.append(install_sandbox_runs_item) + + _install_stack = d.pop("install_stack", UNSET) + install_stack: Union[Unset, AppInstallStack] + if isinstance(_install_stack, Unset): + install_stack = UNSET + else: + install_stack = AppInstallStack.from_dict(_install_stack) + + install_states = [] + _install_states = d.pop("install_states", UNSET) + for install_states_item_data in _install_states or []: + install_states_item = AppInstallState.from_dict(install_states_item_data) + + install_states.append(install_states_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppInstallLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppInstallLinks.from_dict(_links) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppInstallMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppInstallMetadata.from_dict(_metadata) + + name = d.pop("name", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + runner_status = d.pop("runner_status", UNSET) + + runner_status_description = d.pop("runner_status_description", UNSET) + + runner_type = d.pop("runner_type", UNSET) + + _sandbox = d.pop("sandbox", UNSET) + sandbox: Union[Unset, AppInstallSandbox] + if isinstance(_sandbox, Unset): + sandbox = UNSET + else: + sandbox = AppInstallSandbox.from_dict(_sandbox) + + sandbox_status = d.pop("sandbox_status", UNSET) + + sandbox_status_description = d.pop("sandbox_status_description", UNSET) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + workflows = [] + _workflows = d.pop("workflows", UNSET) + for workflows_item_data in _workflows or []: + workflows_item = AppWorkflow.from_dict(workflows_item_data) + + workflows.append(workflows_item) + + app_install = cls( + app_config_id=app_config_id, + app_id=app_id, + app_runner_config=app_runner_config, + app_sandbox_config=app_sandbox_config, + aws_account=aws_account, + azure_account=azure_account, + cloud_platform=cloud_platform, + component_statuses=component_statuses, + composite_component_status=composite_component_status, + composite_component_status_description=composite_component_status_description, + created_at=created_at, + created_by_id=created_by_id, + drifted_objects=drifted_objects, + id=id, + install_action_workflows=install_action_workflows, + install_components=install_components, + install_config=install_config, + install_events=install_events, + install_inputs=install_inputs, + install_number=install_number, + install_sandbox_runs=install_sandbox_runs, + install_stack=install_stack, + install_states=install_states, + links=links, + metadata=metadata, + name=name, + runner_id=runner_id, + runner_status=runner_status, + runner_status_description=runner_status_description, + runner_type=runner_type, + sandbox=sandbox, + sandbox_status=sandbox_status, + sandbox_status_description=sandbox_status_description, + status=status, + status_description=status_description, + updated_at=updated_at, + workflows=workflows, + ) + + app_install.additional_properties = d + return app_install + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow.py b/nuon/models/app_install_action_workflow.py new file mode 100644 index 00000000..29244516 --- /dev/null +++ b/nuon/models/app_install_action_workflow.py @@ -0,0 +1,156 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_action_workflow import AppActionWorkflow + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + + +T = TypeVar("T", bound="AppInstallActionWorkflow") + + +@_attrs_define +class AppInstallActionWorkflow: + """ + Attributes: + action_workflow (Union[Unset, AppActionWorkflow]): + action_workflow_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + runs (Union[Unset, list['AppInstallActionWorkflowRun']]): + status (Union[Unset, str]): after query fields filled in after querying + updated_at (Union[Unset, str]): + """ + + action_workflow: Union[Unset, "AppActionWorkflow"] = UNSET + action_workflow_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET + status: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.action_workflow, Unset): + action_workflow = self.action_workflow.to_dict() + + action_workflow_id = self.action_workflow_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.runs, Unset): + runs = [] + for runs_item_data in self.runs: + runs_item = runs_item_data.to_dict() + runs.append(runs_item) + + status = self.status + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow is not UNSET: + field_dict["action_workflow"] = action_workflow + if action_workflow_id is not UNSET: + field_dict["action_workflow_id"] = action_workflow_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if runs is not UNSET: + field_dict["runs"] = runs + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_action_workflow import AppActionWorkflow + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + + d = dict(src_dict) + _action_workflow = d.pop("action_workflow", UNSET) + action_workflow: Union[Unset, AppActionWorkflow] + if isinstance(_action_workflow, Unset): + action_workflow = UNSET + else: + action_workflow = AppActionWorkflow.from_dict(_action_workflow) + + action_workflow_id = d.pop("action_workflow_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + runs = [] + _runs = d.pop("runs", UNSET) + for runs_item_data in _runs or []: + runs_item = AppInstallActionWorkflowRun.from_dict(runs_item_data) + + runs.append(runs_item) + + status = d.pop("status", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_install_action_workflow = cls( + action_workflow=action_workflow, + action_workflow_id=action_workflow_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + runs=runs, + status=status, + updated_at=updated_at, + ) + + app_install_action_workflow.additional_properties = d + return app_install_action_workflow + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run.py b/nuon/models/app_install_action_workflow_run.py new file mode 100644 index 00000000..34951381 --- /dev/null +++ b/nuon/models/app_install_action_workflow_run.py @@ -0,0 +1,380 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_action_workflow_trigger_type import AppActionWorkflowTriggerType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_action_workflow_config import AppActionWorkflowConfig + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow import AppInstallActionWorkflow + from ..models.app_install_action_workflow_run_outputs import AppInstallActionWorkflowRunOutputs + from ..models.app_install_action_workflow_run_run_env_vars import AppInstallActionWorkflowRunRunEnvVars + from ..models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep + from ..models.app_log_stream import AppLogStream + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow import AppWorkflow + + +T = TypeVar("T", bound="AppInstallActionWorkflowRun") + + +@_attrs_define +class AppInstallActionWorkflowRun: + """ + Attributes: + action_workflow_config_id (Union[Unset, str]): + config (Union[Unset, AppActionWorkflowConfig]): + created_at (Union[Unset, str]): + created_by (Union[Unset, AppAccount]): + created_by_id (Union[Unset, str]): + execution_time (Union[Unset, int]): after query + id (Union[Unset, str]): + install_action_workflow (Union[Unset, AppInstallActionWorkflow]): + install_action_workflow_id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_workflow_id (Union[Unset, str]): + log_stream (Union[Unset, AppLogStream]): + outputs (Union[Unset, AppInstallActionWorkflowRunOutputs]): + run_env_vars (Union[Unset, AppInstallActionWorkflowRunRunEnvVars]): + runner_job (Union[Unset, AppRunnerJob]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + status_v2 (Union[Unset, AppCompositeStatus]): + steps (Union[Unset, list['AppInstallActionWorkflowRunStep']]): + trigger_type (Union[Unset, AppActionWorkflowTriggerType]): + triggered_by_id (Union[Unset, str]): + triggered_by_type (Union[Unset, str]): + updated_at (Union[Unset, str]): + workflow (Union[Unset, AppWorkflow]): + workflow_id (Union[Unset, str]): + """ + + action_workflow_config_id: Union[Unset, str] = UNSET + config: Union[Unset, "AppActionWorkflowConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by: Union[Unset, "AppAccount"] = UNSET + created_by_id: Union[Unset, str] = UNSET + execution_time: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + install_action_workflow: Union[Unset, "AppInstallActionWorkflow"] = UNSET + install_action_workflow_id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_workflow_id: Union[Unset, str] = UNSET + log_stream: Union[Unset, "AppLogStream"] = UNSET + outputs: Union[Unset, "AppInstallActionWorkflowRunOutputs"] = UNSET + run_env_vars: Union[Unset, "AppInstallActionWorkflowRunRunEnvVars"] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + status_v2: Union[Unset, "AppCompositeStatus"] = UNSET + steps: Union[Unset, list["AppInstallActionWorkflowRunStep"]] = UNSET + trigger_type: Union[Unset, AppActionWorkflowTriggerType] = UNSET + triggered_by_id: Union[Unset, str] = UNSET + triggered_by_type: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + workflow: Union[Unset, "AppWorkflow"] = UNSET + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_config_id = self.action_workflow_config_id + + config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + created_at = self.created_at + + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_by_id = self.created_by_id + + execution_time = self.execution_time + + id = self.id + + install_action_workflow: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_action_workflow, Unset): + install_action_workflow = self.install_action_workflow.to_dict() + + install_action_workflow_id = self.install_action_workflow_id + + install_id = self.install_id + + install_workflow_id = self.install_workflow_id + + log_stream: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.log_stream, Unset): + log_stream = self.log_stream.to_dict() + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + run_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.run_env_vars, Unset): + run_env_vars = self.run_env_vars.to_dict() + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + status = self.status + + status_description = self.status_description + + status_v2: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status_v2, Unset): + status_v2 = self.status_v2.to_dict() + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + trigger_type: Union[Unset, str] = UNSET + if not isinstance(self.trigger_type, Unset): + trigger_type = self.trigger_type.value + + triggered_by_id = self.triggered_by_id + + triggered_by_type = self.triggered_by_type + + updated_at = self.updated_at + + workflow: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.workflow, Unset): + workflow = self.workflow.to_dict() + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_config_id is not UNSET: + field_dict["action_workflow_config_id"] = action_workflow_config_id + if config is not UNSET: + field_dict["config"] = config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if execution_time is not UNSET: + field_dict["execution_time"] = execution_time + if id is not UNSET: + field_dict["id"] = id + if install_action_workflow is not UNSET: + field_dict["install_action_workflow"] = install_action_workflow + if install_action_workflow_id is not UNSET: + field_dict["install_action_workflow_id"] = install_action_workflow_id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_workflow_id is not UNSET: + field_dict["install_workflow_id"] = install_workflow_id + if log_stream is not UNSET: + field_dict["log_stream"] = log_stream + if outputs is not UNSET: + field_dict["outputs"] = outputs + if run_env_vars is not UNSET: + field_dict["run_env_vars"] = run_env_vars + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if status_v2 is not UNSET: + field_dict["status_v2"] = status_v2 + if steps is not UNSET: + field_dict["steps"] = steps + if trigger_type is not UNSET: + field_dict["trigger_type"] = trigger_type + if triggered_by_id is not UNSET: + field_dict["triggered_by_id"] = triggered_by_id + if triggered_by_type is not UNSET: + field_dict["triggered_by_type"] = triggered_by_type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflow is not UNSET: + field_dict["workflow"] = workflow + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_action_workflow_config import AppActionWorkflowConfig + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow import AppInstallActionWorkflow + from ..models.app_install_action_workflow_run_outputs import AppInstallActionWorkflowRunOutputs + from ..models.app_install_action_workflow_run_run_env_vars import AppInstallActionWorkflowRunRunEnvVars + from ..models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep + from ..models.app_log_stream import AppLogStream + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow import AppWorkflow + + d = dict(src_dict) + action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) + + _config = d.pop("config", UNSET) + config: Union[Unset, AppActionWorkflowConfig] + if isinstance(_config, Unset): + config = UNSET + else: + config = AppActionWorkflowConfig.from_dict(_config) + + created_at = d.pop("created_at", UNSET) + + _created_by = d.pop("created_by", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_by_id = d.pop("created_by_id", UNSET) + + execution_time = d.pop("execution_time", UNSET) + + id = d.pop("id", UNSET) + + _install_action_workflow = d.pop("install_action_workflow", UNSET) + install_action_workflow: Union[Unset, AppInstallActionWorkflow] + if isinstance(_install_action_workflow, Unset): + install_action_workflow = UNSET + else: + install_action_workflow = AppInstallActionWorkflow.from_dict(_install_action_workflow) + + install_action_workflow_id = d.pop("install_action_workflow_id", UNSET) + + install_id = d.pop("install_id", UNSET) + + install_workflow_id = d.pop("install_workflow_id", UNSET) + + _log_stream = d.pop("log_stream", UNSET) + log_stream: Union[Unset, AppLogStream] + if isinstance(_log_stream, Unset): + log_stream = UNSET + else: + log_stream = AppLogStream.from_dict(_log_stream) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, AppInstallActionWorkflowRunOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = AppInstallActionWorkflowRunOutputs.from_dict(_outputs) + + _run_env_vars = d.pop("run_env_vars", UNSET) + run_env_vars: Union[Unset, AppInstallActionWorkflowRunRunEnvVars] + if isinstance(_run_env_vars, Unset): + run_env_vars = UNSET + else: + run_env_vars = AppInstallActionWorkflowRunRunEnvVars.from_dict(_run_env_vars) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _status_v2 = d.pop("status_v2", UNSET) + status_v2: Union[Unset, AppCompositeStatus] + if isinstance(_status_v2, Unset): + status_v2 = UNSET + else: + status_v2 = AppCompositeStatus.from_dict(_status_v2) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = AppInstallActionWorkflowRunStep.from_dict(steps_item_data) + + steps.append(steps_item) + + _trigger_type = d.pop("trigger_type", UNSET) + trigger_type: Union[Unset, AppActionWorkflowTriggerType] + if isinstance(_trigger_type, Unset): + trigger_type = UNSET + else: + trigger_type = AppActionWorkflowTriggerType(_trigger_type) + + triggered_by_id = d.pop("triggered_by_id", UNSET) + + triggered_by_type = d.pop("triggered_by_type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _workflow = d.pop("workflow", UNSET) + workflow: Union[Unset, AppWorkflow] + if isinstance(_workflow, Unset): + workflow = UNSET + else: + workflow = AppWorkflow.from_dict(_workflow) + + workflow_id = d.pop("workflow_id", UNSET) + + app_install_action_workflow_run = cls( + action_workflow_config_id=action_workflow_config_id, + config=config, + created_at=created_at, + created_by=created_by, + created_by_id=created_by_id, + execution_time=execution_time, + id=id, + install_action_workflow=install_action_workflow, + install_action_workflow_id=install_action_workflow_id, + install_id=install_id, + install_workflow_id=install_workflow_id, + log_stream=log_stream, + outputs=outputs, + run_env_vars=run_env_vars, + runner_job=runner_job, + status=status, + status_description=status_description, + status_v2=status_v2, + steps=steps, + trigger_type=trigger_type, + triggered_by_id=triggered_by_id, + triggered_by_type=triggered_by_type, + updated_at=updated_at, + workflow=workflow, + workflow_id=workflow_id, + ) + + app_install_action_workflow_run.additional_properties = d + return app_install_action_workflow_run + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_outputs.py b/nuon/models/app_install_action_workflow_run_outputs.py new file mode 100644 index 00000000..f43cd7eb --- /dev/null +++ b/nuon/models/app_install_action_workflow_run_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallActionWorkflowRunOutputs") + + +@_attrs_define +class AppInstallActionWorkflowRunOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_action_workflow_run_outputs = cls() + + app_install_action_workflow_run_outputs.additional_properties = d + return app_install_action_workflow_run_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_run_env_vars.py b/nuon/models/app_install_action_workflow_run_run_env_vars.py new file mode 100644 index 00000000..d901645e --- /dev/null +++ b/nuon/models/app_install_action_workflow_run_run_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallActionWorkflowRunRunEnvVars") + + +@_attrs_define +class AppInstallActionWorkflowRunRunEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_action_workflow_run_run_env_vars = cls() + + app_install_action_workflow_run_run_env_vars.additional_properties = d + return app_install_action_workflow_run_run_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_step.py b/nuon/models/app_install_action_workflow_run_step.py new file mode 100644 index 00000000..dce05586 --- /dev/null +++ b/nuon/models/app_install_action_workflow_run_step.py @@ -0,0 +1,130 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_action_workflow_run_step_status import AppInstallActionWorkflowRunStepStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppInstallActionWorkflowRunStep") + + +@_attrs_define +class AppInstallActionWorkflowRunStep: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + execution_duration (Union[Unset, int]): + id (Union[Unset, str]): + install_action_workflow_run_id (Union[Unset, str]): + status (Union[Unset, AppInstallActionWorkflowRunStepStatus]): + step_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + execution_duration: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + install_action_workflow_run_id: Union[Unset, str] = UNSET + status: Union[Unset, AppInstallActionWorkflowRunStepStatus] = UNSET + step_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + execution_duration = self.execution_duration + + id = self.id + + install_action_workflow_run_id = self.install_action_workflow_run_id + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + step_id = self.step_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if execution_duration is not UNSET: + field_dict["execution_duration"] = execution_duration + if id is not UNSET: + field_dict["id"] = id + if install_action_workflow_run_id is not UNSET: + field_dict["install_action_workflow_run_id"] = install_action_workflow_run_id + if status is not UNSET: + field_dict["status"] = status + if step_id is not UNSET: + field_dict["step_id"] = step_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + execution_duration = d.pop("execution_duration", UNSET) + + id = d.pop("id", UNSET) + + install_action_workflow_run_id = d.pop("install_action_workflow_run_id", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppInstallActionWorkflowRunStepStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppInstallActionWorkflowRunStepStatus(_status) + + step_id = d.pop("step_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_install_action_workflow_run_step = cls( + created_at=created_at, + created_by_id=created_by_id, + execution_duration=execution_duration, + id=id, + install_action_workflow_run_id=install_action_workflow_run_id, + status=status, + step_id=step_id, + updated_at=updated_at, + ) + + app_install_action_workflow_run_step.additional_properties = d + return app_install_action_workflow_run_step + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_action_workflow_run_step_status.py b/nuon/models/app_install_action_workflow_run_step_status.py new file mode 100644 index 00000000..c0fe7c36 --- /dev/null +++ b/nuon/models/app_install_action_workflow_run_step_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AppInstallActionWorkflowRunStepStatus(str, Enum): + ERROR = "error" + FINISHED = "finished" + IN_PROGRESS = "in-progress" + PENDING = "pending" + TIMED_OUT = "timed-out" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_install_approval_option.py b/nuon/models/app_install_approval_option.py new file mode 100644 index 00000000..13fe1526 --- /dev/null +++ b/nuon/models/app_install_approval_option.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AppInstallApprovalOption(str, Enum): + APPROVE_ALL = "approve-all" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_install_audit_log.py b/nuon/models/app_install_audit_log.py new file mode 100644 index 00000000..ebeacd34 --- /dev/null +++ b/nuon/models/app_install_audit_log.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppInstallAuditLog") + + +@_attrs_define +class AppInstallAuditLog: + """ + Attributes: + install_id (Union[Unset, str]): + log_line (Union[Unset, str]): + time_stamp (Union[Unset, str]): + type_ (Union[Unset, str]): + """ + + install_id: Union[Unset, str] = UNSET + log_line: Union[Unset, str] = UNSET + time_stamp: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + install_id = self.install_id + + log_line = self.log_line + + time_stamp = self.time_stamp + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if install_id is not UNSET: + field_dict["install_id"] = install_id + if log_line is not UNSET: + field_dict["log_line"] = log_line + if time_stamp is not UNSET: + field_dict["time_stamp"] = time_stamp + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + install_id = d.pop("install_id", UNSET) + + log_line = d.pop("log_line", UNSET) + + time_stamp = d.pop("time_stamp", UNSET) + + type_ = d.pop("type", UNSET) + + app_install_audit_log = cls( + install_id=install_id, + log_line=log_line, + time_stamp=time_stamp, + type_=type_, + ) + + app_install_audit_log.additional_properties = d + return app_install_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/nuon/models/app_install_component.py b/nuon/models/app_install_component.py new file mode 100644 index 00000000..786a6439 --- /dev/null +++ b/nuon/models/app_install_component.py @@ -0,0 +1,255 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_component import AppComponent + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_drifted_object import AppDriftedObject + from ..models.app_helm_chart import AppHelmChart + from ..models.app_install_component_links import AppInstallComponentLinks + from ..models.app_install_deploy import AppInstallDeploy + from ..models.app_terraform_workspace import AppTerraformWorkspace + + +T = TypeVar("T", bound="AppInstallComponent") + + +@_attrs_define +class AppInstallComponent: + """ + Attributes: + component (Union[Unset, AppComponent]): + component_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + drifted_object (Union[Unset, AppDriftedObject]): + helm_chart (Union[Unset, AppHelmChart]): + id (Union[Unset, str]): + install_deploys (Union[Unset, list['AppInstallDeploy']]): + install_id (Union[Unset, str]): + links (Union[Unset, AppInstallComponentLinks]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + status_v2 (Union[Unset, AppCompositeStatus]): + terraform_workspace (Union[Unset, AppTerraformWorkspace]): + updated_at (Union[Unset, str]): + """ + + component: Union[Unset, "AppComponent"] = UNSET + component_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + drifted_object: Union[Unset, "AppDriftedObject"] = UNSET + helm_chart: Union[Unset, "AppHelmChart"] = UNSET + id: Union[Unset, str] = UNSET + install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET + install_id: Union[Unset, str] = UNSET + links: Union[Unset, "AppInstallComponentLinks"] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + status_v2: Union[Unset, "AppCompositeStatus"] = UNSET + terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + component: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.component, Unset): + component = self.component.to_dict() + + component_id = self.component_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + drifted_object: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.drifted_object, Unset): + drifted_object = self.drifted_object.to_dict() + + helm_chart: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm_chart, Unset): + helm_chart = self.helm_chart.to_dict() + + id = self.id + + install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_deploys, Unset): + install_deploys = [] + for install_deploys_item_data in self.install_deploys: + install_deploys_item = install_deploys_item_data.to_dict() + install_deploys.append(install_deploys_item) + + install_id = self.install_id + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + status = self.status + + status_description = self.status_description + + status_v2: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status_v2, Unset): + status_v2 = self.status_v2.to_dict() + + terraform_workspace: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_workspace, Unset): + terraform_workspace = self.terraform_workspace.to_dict() + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if component is not UNSET: + field_dict["component"] = component + if component_id is not UNSET: + field_dict["component_id"] = component_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if drifted_object is not UNSET: + field_dict["drifted_object"] = drifted_object + if helm_chart is not UNSET: + field_dict["helm_chart"] = helm_chart + if id is not UNSET: + field_dict["id"] = id + if install_deploys is not UNSET: + field_dict["install_deploys"] = install_deploys + if install_id is not UNSET: + field_dict["install_id"] = install_id + if links is not UNSET: + field_dict["links"] = links + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if status_v2 is not UNSET: + field_dict["status_v2"] = status_v2 + if terraform_workspace is not UNSET: + field_dict["terraform_workspace"] = terraform_workspace + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_component import AppComponent + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_drifted_object import AppDriftedObject + from ..models.app_helm_chart import AppHelmChart + from ..models.app_install_component_links import AppInstallComponentLinks + from ..models.app_install_deploy import AppInstallDeploy + from ..models.app_terraform_workspace import AppTerraformWorkspace + + d = dict(src_dict) + _component = d.pop("component", UNSET) + component: Union[Unset, AppComponent] + if isinstance(_component, Unset): + component = UNSET + else: + component = AppComponent.from_dict(_component) + + component_id = d.pop("component_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _drifted_object = d.pop("drifted_object", UNSET) + drifted_object: Union[Unset, AppDriftedObject] + if isinstance(_drifted_object, Unset): + drifted_object = UNSET + else: + drifted_object = AppDriftedObject.from_dict(_drifted_object) + + _helm_chart = d.pop("helm_chart", UNSET) + helm_chart: Union[Unset, AppHelmChart] + if isinstance(_helm_chart, Unset): + helm_chart = UNSET + else: + helm_chart = AppHelmChart.from_dict(_helm_chart) + + id = d.pop("id", UNSET) + + install_deploys = [] + _install_deploys = d.pop("install_deploys", UNSET) + for install_deploys_item_data in _install_deploys or []: + install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) + + install_deploys.append(install_deploys_item) + + install_id = d.pop("install_id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppInstallComponentLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppInstallComponentLinks.from_dict(_links) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _status_v2 = d.pop("status_v2", UNSET) + status_v2: Union[Unset, AppCompositeStatus] + if isinstance(_status_v2, Unset): + status_v2 = UNSET + else: + status_v2 = AppCompositeStatus.from_dict(_status_v2) + + _terraform_workspace = d.pop("terraform_workspace", UNSET) + terraform_workspace: Union[Unset, AppTerraformWorkspace] + if isinstance(_terraform_workspace, Unset): + terraform_workspace = UNSET + else: + terraform_workspace = AppTerraformWorkspace.from_dict(_terraform_workspace) + + updated_at = d.pop("updated_at", UNSET) + + app_install_component = cls( + component=component, + component_id=component_id, + created_at=created_at, + created_by_id=created_by_id, + drifted_object=drifted_object, + helm_chart=helm_chart, + id=id, + install_deploys=install_deploys, + install_id=install_id, + links=links, + status=status, + status_description=status_description, + status_v2=status_v2, + terraform_workspace=terraform_workspace, + updated_at=updated_at, + ) + + app_install_component.additional_properties = d + return app_install_component + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_component_links.py b/nuon/models/app_install_component_links.py new file mode 100644 index 00000000..f581acfb --- /dev/null +++ b/nuon/models/app_install_component_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallComponentLinks") + + +@_attrs_define +class AppInstallComponentLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_component_links = cls() + + app_install_component_links.additional_properties = d + return app_install_component_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_component_statuses.py b/nuon/models/app_install_component_statuses.py new file mode 100644 index 00000000..15e94f1b --- /dev/null +++ b/nuon/models/app_install_component_statuses.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallComponentStatuses") + + +@_attrs_define +class AppInstallComponentStatuses: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_component_statuses = cls() + + app_install_component_statuses.additional_properties = d + return app_install_component_statuses + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_component_summary.py b/nuon/models/app_install_component_summary.py new file mode 100644 index 00000000..ba10fa89 --- /dev/null +++ b/nuon/models/app_install_component_summary.py @@ -0,0 +1,181 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_component_build_status import AppComponentBuildStatus +from ..models.app_install_deploy_status import AppInstallDeployStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_component import AppComponent + from ..models.app_component_config_connection import AppComponentConfigConnection + + +T = TypeVar("T", bound="AppInstallComponentSummary") + + +@_attrs_define +class AppInstallComponentSummary: + """ + Attributes: + build_status (Union[Unset, AppComponentBuildStatus]): + build_status_description (Union[Unset, str]): + component_config (Union[Unset, AppComponentConfigConnection]): + component_id (Union[Unset, str]): + component_name (Union[Unset, str]): + dependencies (Union[Unset, list['AppComponent']]): + deploy_status (Union[Unset, AppInstallDeployStatus]): + deploy_status_description (Union[Unset, str]): + drifted_status (Union[Unset, bool]): + id (Union[Unset, str]): + """ + + build_status: Union[Unset, AppComponentBuildStatus] = UNSET + build_status_description: Union[Unset, str] = UNSET + component_config: Union[Unset, "AppComponentConfigConnection"] = UNSET + component_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + dependencies: Union[Unset, list["AppComponent"]] = UNSET + deploy_status: Union[Unset, AppInstallDeployStatus] = UNSET + deploy_status_description: Union[Unset, str] = UNSET + drifted_status: Union[Unset, bool] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_status: Union[Unset, str] = UNSET + if not isinstance(self.build_status, Unset): + build_status = self.build_status.value + + build_status_description = self.build_status_description + + component_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.component_config, Unset): + component_config = self.component_config.to_dict() + + component_id = self.component_id + + component_name = self.component_name + + dependencies: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = [] + for dependencies_item_data in self.dependencies: + dependencies_item = dependencies_item_data.to_dict() + dependencies.append(dependencies_item) + + deploy_status: Union[Unset, str] = UNSET + if not isinstance(self.deploy_status, Unset): + deploy_status = self.deploy_status.value + + deploy_status_description = self.deploy_status_description + + drifted_status = self.drifted_status + + id = self.id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_status is not UNSET: + field_dict["build_status"] = build_status + if build_status_description is not UNSET: + field_dict["build_status_description"] = build_status_description + if component_config is not UNSET: + field_dict["component_config"] = component_config + if component_id is not UNSET: + field_dict["component_id"] = component_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if deploy_status is not UNSET: + field_dict["deploy_status"] = deploy_status + if deploy_status_description is not UNSET: + field_dict["deploy_status_description"] = deploy_status_description + if drifted_status is not UNSET: + field_dict["drifted_status"] = drifted_status + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_component import AppComponent + from ..models.app_component_config_connection import AppComponentConfigConnection + + d = dict(src_dict) + _build_status = d.pop("build_status", UNSET) + build_status: Union[Unset, AppComponentBuildStatus] + if isinstance(_build_status, Unset): + build_status = UNSET + else: + build_status = AppComponentBuildStatus(_build_status) + + build_status_description = d.pop("build_status_description", UNSET) + + _component_config = d.pop("component_config", UNSET) + component_config: Union[Unset, AppComponentConfigConnection] + if isinstance(_component_config, Unset): + component_config = UNSET + else: + component_config = AppComponentConfigConnection.from_dict(_component_config) + + component_id = d.pop("component_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + dependencies = [] + _dependencies = d.pop("dependencies", UNSET) + for dependencies_item_data in _dependencies or []: + dependencies_item = AppComponent.from_dict(dependencies_item_data) + + dependencies.append(dependencies_item) + + _deploy_status = d.pop("deploy_status", UNSET) + deploy_status: Union[Unset, AppInstallDeployStatus] + if isinstance(_deploy_status, Unset): + deploy_status = UNSET + else: + deploy_status = AppInstallDeployStatus(_deploy_status) + + deploy_status_description = d.pop("deploy_status_description", UNSET) + + drifted_status = d.pop("drifted_status", UNSET) + + id = d.pop("id", UNSET) + + app_install_component_summary = cls( + build_status=build_status, + build_status_description=build_status_description, + component_config=component_config, + component_id=component_id, + component_name=component_name, + dependencies=dependencies, + deploy_status=deploy_status, + deploy_status_description=deploy_status_description, + drifted_status=drifted_status, + id=id, + ) + + app_install_component_summary.additional_properties = d + return app_install_component_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_config.py b/nuon/models/app_install_config.py new file mode 100644 index 00000000..5b804f90 --- /dev/null +++ b/nuon/models/app_install_config.py @@ -0,0 +1,121 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppInstallConfig") + + +@_attrs_define +class AppInstallConfig: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_install_config = cls( + approval_option=approval_option, + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + org_id=org_id, + updated_at=updated_at, + ) + + app_install_config.additional_properties = d + return app_install_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_deploy.py b/nuon/models/app_install_deploy.py new file mode 100644 index 00000000..e511236e --- /dev/null +++ b/nuon/models/app_install_deploy.py @@ -0,0 +1,383 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_deploy_type import AppInstallDeployType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_component_build import AppComponentBuild + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + from ..models.app_install_deploy_outputs import AppInstallDeployOutputs + from ..models.app_log_stream import AppLogStream + from ..models.app_oci_artifact import AppOCIArtifact + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow import AppWorkflow + + +T = TypeVar("T", bound="AppInstallDeploy") + + +@_attrs_define +class AppInstallDeploy: + """ + Attributes: + action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): + build_id (Union[Unset, str]): + component_build (Union[Unset, AppComponentBuild]): + component_config_version (Union[Unset, int]): + component_id (Union[Unset, str]): + component_name (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by (Union[Unset, AppAccount]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_component_id (Union[Unset, str]): + install_deploy_type (Union[Unset, AppInstallDeployType]): + install_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery + install_workflow_id (Union[Unset, str]): DEPRECATED: use WorkflowID + log_stream (Union[Unset, AppLogStream]): + oci_artifact (Union[Unset, AppOCIArtifact]): + outputs (Union[Unset, AppInstallDeployOutputs]): + plan_only (Union[Unset, bool]): + release_id (Union[Unset, str]): + runner_jobs (Union[Unset, list['AppRunnerJob']]): runner details + status (Union[Unset, str]): + status_description (Union[Unset, str]): + status_v2 (Union[Unset, AppCompositeStatus]): + updated_at (Union[Unset, str]): + workflow (Union[Unset, AppWorkflow]): + workflow_id (Union[Unset, str]): + """ + + action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET + build_id: Union[Unset, str] = UNSET + component_build: Union[Unset, "AppComponentBuild"] = UNSET + component_config_version: Union[Unset, int] = UNSET + component_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by: Union[Unset, "AppAccount"] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_component_id: Union[Unset, str] = UNSET + install_deploy_type: Union[Unset, AppInstallDeployType] = UNSET + install_id: Union[Unset, str] = UNSET + install_workflow_id: Union[Unset, str] = UNSET + log_stream: Union[Unset, "AppLogStream"] = UNSET + oci_artifact: Union[Unset, "AppOCIArtifact"] = UNSET + outputs: Union[Unset, "AppInstallDeployOutputs"] = UNSET + plan_only: Union[Unset, bool] = UNSET + release_id: Union[Unset, str] = UNSET + runner_jobs: Union[Unset, list["AppRunnerJob"]] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + status_v2: Union[Unset, "AppCompositeStatus"] = UNSET + updated_at: Union[Unset, str] = UNSET + workflow: Union[Unset, "AppWorkflow"] = UNSET + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.action_workflow_runs, Unset): + action_workflow_runs = [] + for action_workflow_runs_item_data in self.action_workflow_runs: + action_workflow_runs_item = action_workflow_runs_item_data.to_dict() + action_workflow_runs.append(action_workflow_runs_item) + + build_id = self.build_id + + component_build: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.component_build, Unset): + component_build = self.component_build.to_dict() + + component_config_version = self.component_config_version + + component_id = self.component_id + + component_name = self.component_name + + created_at = self.created_at + + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_by_id = self.created_by_id + + id = self.id + + install_component_id = self.install_component_id + + install_deploy_type: Union[Unset, str] = UNSET + if not isinstance(self.install_deploy_type, Unset): + install_deploy_type = self.install_deploy_type.value + + install_id = self.install_id + + install_workflow_id = self.install_workflow_id + + log_stream: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.log_stream, Unset): + log_stream = self.log_stream.to_dict() + + oci_artifact: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.oci_artifact, Unset): + oci_artifact = self.oci_artifact.to_dict() + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + plan_only = self.plan_only + + release_id = self.release_id + + runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.runner_jobs, Unset): + runner_jobs = [] + for runner_jobs_item_data in self.runner_jobs: + runner_jobs_item = runner_jobs_item_data.to_dict() + runner_jobs.append(runner_jobs_item) + + status = self.status + + status_description = self.status_description + + status_v2: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status_v2, Unset): + status_v2 = self.status_v2.to_dict() + + updated_at = self.updated_at + + workflow: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.workflow, Unset): + workflow = self.workflow.to_dict() + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_runs is not UNSET: + field_dict["action_workflow_runs"] = action_workflow_runs + if build_id is not UNSET: + field_dict["build_id"] = build_id + if component_build is not UNSET: + field_dict["component_build"] = component_build + if component_config_version is not UNSET: + field_dict["component_config_version"] = component_config_version + if component_id is not UNSET: + field_dict["component_id"] = component_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_component_id is not UNSET: + field_dict["install_component_id"] = install_component_id + if install_deploy_type is not UNSET: + field_dict["install_deploy_type"] = install_deploy_type + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_workflow_id is not UNSET: + field_dict["install_workflow_id"] = install_workflow_id + if log_stream is not UNSET: + field_dict["log_stream"] = log_stream + if oci_artifact is not UNSET: + field_dict["oci_artifact"] = oci_artifact + if outputs is not UNSET: + field_dict["outputs"] = outputs + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + if release_id is not UNSET: + field_dict["release_id"] = release_id + if runner_jobs is not UNSET: + field_dict["runner_jobs"] = runner_jobs + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if status_v2 is not UNSET: + field_dict["status_v2"] = status_v2 + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflow is not UNSET: + field_dict["workflow"] = workflow + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_component_build import AppComponentBuild + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + from ..models.app_install_deploy_outputs import AppInstallDeployOutputs + from ..models.app_log_stream import AppLogStream + from ..models.app_oci_artifact import AppOCIArtifact + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow import AppWorkflow + + d = dict(src_dict) + action_workflow_runs = [] + _action_workflow_runs = d.pop("action_workflow_runs", UNSET) + for action_workflow_runs_item_data in _action_workflow_runs or []: + action_workflow_runs_item = AppInstallActionWorkflowRun.from_dict(action_workflow_runs_item_data) + + action_workflow_runs.append(action_workflow_runs_item) + + build_id = d.pop("build_id", UNSET) + + _component_build = d.pop("component_build", UNSET) + component_build: Union[Unset, AppComponentBuild] + if isinstance(_component_build, Unset): + component_build = UNSET + else: + component_build = AppComponentBuild.from_dict(_component_build) + + component_config_version = d.pop("component_config_version", UNSET) + + component_id = d.pop("component_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + _created_by = d.pop("created_by", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_component_id = d.pop("install_component_id", UNSET) + + _install_deploy_type = d.pop("install_deploy_type", UNSET) + install_deploy_type: Union[Unset, AppInstallDeployType] + if isinstance(_install_deploy_type, Unset): + install_deploy_type = UNSET + else: + install_deploy_type = AppInstallDeployType(_install_deploy_type) + + install_id = d.pop("install_id", UNSET) + + install_workflow_id = d.pop("install_workflow_id", UNSET) + + _log_stream = d.pop("log_stream", UNSET) + log_stream: Union[Unset, AppLogStream] + if isinstance(_log_stream, Unset): + log_stream = UNSET + else: + log_stream = AppLogStream.from_dict(_log_stream) + + _oci_artifact = d.pop("oci_artifact", UNSET) + oci_artifact: Union[Unset, AppOCIArtifact] + if isinstance(_oci_artifact, Unset): + oci_artifact = UNSET + else: + oci_artifact = AppOCIArtifact.from_dict(_oci_artifact) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, AppInstallDeployOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = AppInstallDeployOutputs.from_dict(_outputs) + + plan_only = d.pop("plan_only", UNSET) + + release_id = d.pop("release_id", UNSET) + + runner_jobs = [] + _runner_jobs = d.pop("runner_jobs", UNSET) + for runner_jobs_item_data in _runner_jobs or []: + runner_jobs_item = AppRunnerJob.from_dict(runner_jobs_item_data) + + runner_jobs.append(runner_jobs_item) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _status_v2 = d.pop("status_v2", UNSET) + status_v2: Union[Unset, AppCompositeStatus] + if isinstance(_status_v2, Unset): + status_v2 = UNSET + else: + status_v2 = AppCompositeStatus.from_dict(_status_v2) + + updated_at = d.pop("updated_at", UNSET) + + _workflow = d.pop("workflow", UNSET) + workflow: Union[Unset, AppWorkflow] + if isinstance(_workflow, Unset): + workflow = UNSET + else: + workflow = AppWorkflow.from_dict(_workflow) + + workflow_id = d.pop("workflow_id", UNSET) + + app_install_deploy = cls( + action_workflow_runs=action_workflow_runs, + build_id=build_id, + component_build=component_build, + component_config_version=component_config_version, + component_id=component_id, + component_name=component_name, + created_at=created_at, + created_by=created_by, + created_by_id=created_by_id, + id=id, + install_component_id=install_component_id, + install_deploy_type=install_deploy_type, + install_id=install_id, + install_workflow_id=install_workflow_id, + log_stream=log_stream, + oci_artifact=oci_artifact, + outputs=outputs, + plan_only=plan_only, + release_id=release_id, + runner_jobs=runner_jobs, + status=status, + status_description=status_description, + status_v2=status_v2, + updated_at=updated_at, + workflow=workflow, + workflow_id=workflow_id, + ) + + app_install_deploy.additional_properties = d + return app_install_deploy + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_deploy_outputs.py b/nuon/models/app_install_deploy_outputs.py new file mode 100644 index 00000000..5c32635c --- /dev/null +++ b/nuon/models/app_install_deploy_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallDeployOutputs") + + +@_attrs_define +class AppInstallDeployOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_deploy_outputs = cls() + + app_install_deploy_outputs.additional_properties = d + return app_install_deploy_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_deploy_status.py b/nuon/models/app_install_deploy_status.py new file mode 100644 index 00000000..e570a1c1 --- /dev/null +++ b/nuon/models/app_install_deploy_status.py @@ -0,0 +1,23 @@ +from enum import Enum + + +class AppInstallDeployStatus(str, Enum): + ACTIVE = "active" + APPROVAL_DENIED = "approval-denied" + AUTO_SKIPPED = "auto-skipped" + CANCELLED = "cancelled" + DRIFT_DETECTED = "drift-detected" + ERROR = "error" + EXECUTING = "executing" + INACTIVE = "inactive" + NOOP = "noop" + NO_DRIFT = "no-drift" + PENDING = "pending" + PENDING_APPROVAL = "pending-approval" + PLANNING = "planning" + QUEUED = "queued" + SYNCING = "syncing" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_install_deploy_type.py b/nuon/models/app_install_deploy_type.py new file mode 100644 index 00000000..4ffef6d4 --- /dev/null +++ b/nuon/models/app_install_deploy_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AppInstallDeployType(str, Enum): + APPLY = "apply" + SYNC_IMAGE = "sync-image" + TEARDOWN = "teardown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_install_event.py b/nuon/models/app_install_event.py new file mode 100644 index 00000000..76c84931 --- /dev/null +++ b/nuon/models/app_install_event.py @@ -0,0 +1,161 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_operation_status import AppOperationStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_install_event_payload import AppInstallEventPayload + + +T = TypeVar("T", bound="AppInstallEvent") + + +@_attrs_define +class AppInstallEvent: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + operation (Union[Unset, str]): + operation_name (Union[Unset, str]): + operation_status (Union[Unset, AppOperationStatus]): + org_id (Union[Unset, str]): + payload (Union[Unset, AppInstallEventPayload]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + operation: Union[Unset, str] = UNSET + operation_name: Union[Unset, str] = UNSET + operation_status: Union[Unset, AppOperationStatus] = UNSET + org_id: Union[Unset, str] = UNSET + payload: Union[Unset, "AppInstallEventPayload"] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + operation = self.operation + + operation_name = self.operation_name + + operation_status: Union[Unset, str] = UNSET + if not isinstance(self.operation_status, Unset): + operation_status = self.operation_status.value + + org_id = self.org_id + + payload: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.payload, Unset): + payload = self.payload.to_dict() + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if operation is not UNSET: + field_dict["operation"] = operation + if operation_name is not UNSET: + field_dict["operation_name"] = operation_name + if operation_status is not UNSET: + field_dict["operation_status"] = operation_status + if org_id is not UNSET: + field_dict["org_id"] = org_id + if payload is not UNSET: + field_dict["payload"] = payload + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_install_event_payload import AppInstallEventPayload + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + operation = d.pop("operation", UNSET) + + operation_name = d.pop("operation_name", UNSET) + + _operation_status = d.pop("operation_status", UNSET) + operation_status: Union[Unset, AppOperationStatus] + if isinstance(_operation_status, Unset): + operation_status = UNSET + else: + operation_status = AppOperationStatus(_operation_status) + + org_id = d.pop("org_id", UNSET) + + _payload = d.pop("payload", UNSET) + payload: Union[Unset, AppInstallEventPayload] + if isinstance(_payload, Unset): + payload = UNSET + else: + payload = AppInstallEventPayload.from_dict(_payload) + + updated_at = d.pop("updated_at", UNSET) + + app_install_event = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + operation=operation, + operation_name=operation_name, + operation_status=operation_status, + org_id=org_id, + payload=payload, + updated_at=updated_at, + ) + + app_install_event.additional_properties = d + return app_install_event + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_event_payload.py b/nuon/models/app_install_event_payload.py new file mode 100644 index 00000000..c9ca4b40 --- /dev/null +++ b/nuon/models/app_install_event_payload.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallEventPayload") + + +@_attrs_define +class AppInstallEventPayload: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_event_payload = cls() + + app_install_event_payload.additional_properties = d + return app_install_event_payload + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_inputs.py b/nuon/models/app_install_inputs.py new file mode 100644 index 00000000..953fe32d --- /dev/null +++ b/nuon/models/app_install_inputs.py @@ -0,0 +1,153 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_install_inputs_redacted_values import AppInstallInputsRedactedValues + from ..models.app_install_inputs_values import AppInstallInputsValues + + +T = TypeVar("T", bound="AppInstallInputs") + + +@_attrs_define +class AppInstallInputs: + """ + Attributes: + app_input_config_id (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + org_id (Union[Unset, str]): + redacted_values (Union[Unset, AppInstallInputsRedactedValues]): + updated_at (Union[Unset, str]): + values (Union[Unset, AppInstallInputsValues]): + """ + + app_input_config_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + redacted_values: Union[Unset, "AppInstallInputsRedactedValues"] = UNSET + updated_at: Union[Unset, str] = UNSET + values: Union[Unset, "AppInstallInputsValues"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_input_config_id = self.app_input_config_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + org_id = self.org_id + + redacted_values: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.redacted_values, Unset): + redacted_values = self.redacted_values.to_dict() + + updated_at = self.updated_at + + values: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.values, Unset): + values = self.values.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_input_config_id is not UNSET: + field_dict["app_input_config_id"] = app_input_config_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if redacted_values is not UNSET: + field_dict["redacted_values"] = redacted_values + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_install_inputs_redacted_values import AppInstallInputsRedactedValues + from ..models.app_install_inputs_values import AppInstallInputsValues + + d = dict(src_dict) + app_input_config_id = d.pop("app_input_config_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + _redacted_values = d.pop("redacted_values", UNSET) + redacted_values: Union[Unset, AppInstallInputsRedactedValues] + if isinstance(_redacted_values, Unset): + redacted_values = UNSET + else: + redacted_values = AppInstallInputsRedactedValues.from_dict(_redacted_values) + + updated_at = d.pop("updated_at", UNSET) + + _values = d.pop("values", UNSET) + values: Union[Unset, AppInstallInputsValues] + if isinstance(_values, Unset): + values = UNSET + else: + values = AppInstallInputsValues.from_dict(_values) + + app_install_inputs = cls( + app_input_config_id=app_input_config_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + org_id=org_id, + redacted_values=redacted_values, + updated_at=updated_at, + values=values, + ) + + app_install_inputs.additional_properties = d + return app_install_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_inputs_redacted_values.py b/nuon/models/app_install_inputs_redacted_values.py new file mode 100644 index 00000000..a1a9a94c --- /dev/null +++ b/nuon/models/app_install_inputs_redacted_values.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallInputsRedactedValues") + + +@_attrs_define +class AppInstallInputsRedactedValues: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_inputs_redacted_values = cls() + + app_install_inputs_redacted_values.additional_properties = d + return app_install_inputs_redacted_values + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_inputs_values.py b/nuon/models/app_install_inputs_values.py new file mode 100644 index 00000000..0f61048a --- /dev/null +++ b/nuon/models/app_install_inputs_values.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallInputsValues") + + +@_attrs_define +class AppInstallInputsValues: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_inputs_values = cls() + + app_install_inputs_values.additional_properties = d + return app_install_inputs_values + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_links.py b/nuon/models/app_install_links.py new file mode 100644 index 00000000..5daf3145 --- /dev/null +++ b/nuon/models/app_install_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallLinks") + + +@_attrs_define +class AppInstallLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_links = cls() + + app_install_links.additional_properties = d + return app_install_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_metadata.py b/nuon/models/app_install_metadata.py new file mode 100644 index 00000000..ca9b4c85 --- /dev/null +++ b/nuon/models/app_install_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallMetadata") + + +@_attrs_define +class AppInstallMetadata: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_metadata = cls() + + app_install_metadata.additional_properties = d + return app_install_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_sandbox.py b/nuon/models/app_install_sandbox.py new file mode 100644 index 00000000..33c2d2db --- /dev/null +++ b/nuon/models/app_install_sandbox.py @@ -0,0 +1,174 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_sandbox_run import AppInstallSandboxRun + from ..models.app_terraform_workspace import AppTerraformWorkspace + + +T = TypeVar("T", bound="AppInstallSandbox") + + +@_attrs_define +class AppInstallSandbox: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + status_v2 (Union[Unset, AppCompositeStatus]): + terraform_workspace (Union[Unset, AppTerraformWorkspace]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + status_v2: Union[Unset, "AppCompositeStatus"] = UNSET + terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_sandbox_runs, Unset): + install_sandbox_runs = [] + for install_sandbox_runs_item_data in self.install_sandbox_runs: + install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() + install_sandbox_runs.append(install_sandbox_runs_item) + + status = self.status + + status_description = self.status_description + + status_v2: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status_v2, Unset): + status_v2 = self.status_v2.to_dict() + + terraform_workspace: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_workspace, Unset): + terraform_workspace = self.terraform_workspace.to_dict() + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_sandbox_runs is not UNSET: + field_dict["install_sandbox_runs"] = install_sandbox_runs + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if status_v2 is not UNSET: + field_dict["status_v2"] = status_v2 + if terraform_workspace is not UNSET: + field_dict["terraform_workspace"] = terraform_workspace + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_sandbox_run import AppInstallSandboxRun + from ..models.app_terraform_workspace import AppTerraformWorkspace + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + install_sandbox_runs = [] + _install_sandbox_runs = d.pop("install_sandbox_runs", UNSET) + for install_sandbox_runs_item_data in _install_sandbox_runs or []: + install_sandbox_runs_item = AppInstallSandboxRun.from_dict(install_sandbox_runs_item_data) + + install_sandbox_runs.append(install_sandbox_runs_item) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _status_v2 = d.pop("status_v2", UNSET) + status_v2: Union[Unset, AppCompositeStatus] + if isinstance(_status_v2, Unset): + status_v2 = UNSET + else: + status_v2 = AppCompositeStatus.from_dict(_status_v2) + + _terraform_workspace = d.pop("terraform_workspace", UNSET) + terraform_workspace: Union[Unset, AppTerraformWorkspace] + if isinstance(_terraform_workspace, Unset): + terraform_workspace = UNSET + else: + terraform_workspace = AppTerraformWorkspace.from_dict(_terraform_workspace) + + updated_at = d.pop("updated_at", UNSET) + + app_install_sandbox = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + install_sandbox_runs=install_sandbox_runs, + status=status, + status_description=status_description, + status_v2=status_v2, + terraform_workspace=terraform_workspace, + updated_at=updated_at, + ) + + app_install_sandbox.additional_properties = d + return app_install_sandbox + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_sandbox_run.py b/nuon/models/app_install_sandbox_run.py new file mode 100644 index 00000000..c0de2d52 --- /dev/null +++ b/nuon/models/app_install_sandbox_run.py @@ -0,0 +1,311 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_sandbox_run_type import AppSandboxRunType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + from ..models.app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs + from ..models.app_log_stream import AppLogStream + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow import AppWorkflow + + +T = TypeVar("T", bound="AppInstallSandboxRun") + + +@_attrs_define +class AppInstallSandboxRun: + """ + Attributes: + action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): + app_sandbox_config (Union[Unset, AppAppSandboxConfig]): + created_at (Union[Unset, str]): + created_by (Union[Unset, AppAccount]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_sandbox_id (Union[Unset, str]): TODO: once we run a backfill we can make this non pointer + install_workflow_id (Union[Unset, str]): + log_stream (Union[Unset, AppLogStream]): + outputs (Union[Unset, AppInstallSandboxRunOutputs]): + run_type (Union[Unset, AppSandboxRunType]): + runner_jobs (Union[Unset, list['AppRunnerJob']]): runner details + status (Union[Unset, str]): + status_description (Union[Unset, str]): + status_v2 (Union[Unset, AppCompositeStatus]): + updated_at (Union[Unset, str]): + workflow (Union[Unset, AppWorkflow]): + workflow_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery + """ + + action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET + app_sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by: Union[Unset, "AppAccount"] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_sandbox_id: Union[Unset, str] = UNSET + install_workflow_id: Union[Unset, str] = UNSET + log_stream: Union[Unset, "AppLogStream"] = UNSET + outputs: Union[Unset, "AppInstallSandboxRunOutputs"] = UNSET + run_type: Union[Unset, AppSandboxRunType] = UNSET + runner_jobs: Union[Unset, list["AppRunnerJob"]] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + status_v2: Union[Unset, "AppCompositeStatus"] = UNSET + updated_at: Union[Unset, str] = UNSET + workflow: Union[Unset, "AppWorkflow"] = UNSET + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.action_workflow_runs, Unset): + action_workflow_runs = [] + for action_workflow_runs_item_data in self.action_workflow_runs: + action_workflow_runs_item = action_workflow_runs_item_data.to_dict() + action_workflow_runs.append(action_workflow_runs_item) + + app_sandbox_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.app_sandbox_config, Unset): + app_sandbox_config = self.app_sandbox_config.to_dict() + + created_at = self.created_at + + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + install_sandbox_id = self.install_sandbox_id + + install_workflow_id = self.install_workflow_id + + log_stream: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.log_stream, Unset): + log_stream = self.log_stream.to_dict() + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + run_type: Union[Unset, str] = UNSET + if not isinstance(self.run_type, Unset): + run_type = self.run_type.value + + runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.runner_jobs, Unset): + runner_jobs = [] + for runner_jobs_item_data in self.runner_jobs: + runner_jobs_item = runner_jobs_item_data.to_dict() + runner_jobs.append(runner_jobs_item) + + status = self.status + + status_description = self.status_description + + status_v2: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status_v2, Unset): + status_v2 = self.status_v2.to_dict() + + updated_at = self.updated_at + + workflow: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.workflow, Unset): + workflow = self.workflow.to_dict() + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_runs is not UNSET: + field_dict["action_workflow_runs"] = action_workflow_runs + if app_sandbox_config is not UNSET: + field_dict["app_sandbox_config"] = app_sandbox_config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_sandbox_id is not UNSET: + field_dict["install_sandbox_id"] = install_sandbox_id + if install_workflow_id is not UNSET: + field_dict["install_workflow_id"] = install_workflow_id + if log_stream is not UNSET: + field_dict["log_stream"] = log_stream + if outputs is not UNSET: + field_dict["outputs"] = outputs + if run_type is not UNSET: + field_dict["run_type"] = run_type + if runner_jobs is not UNSET: + field_dict["runner_jobs"] = runner_jobs + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if status_v2 is not UNSET: + field_dict["status_v2"] = status_v2 + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflow is not UNSET: + field_dict["workflow"] = workflow + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_app_sandbox_config import AppAppSandboxConfig + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + from ..models.app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs + from ..models.app_log_stream import AppLogStream + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow import AppWorkflow + + d = dict(src_dict) + action_workflow_runs = [] + _action_workflow_runs = d.pop("action_workflow_runs", UNSET) + for action_workflow_runs_item_data in _action_workflow_runs or []: + action_workflow_runs_item = AppInstallActionWorkflowRun.from_dict(action_workflow_runs_item_data) + + action_workflow_runs.append(action_workflow_runs_item) + + _app_sandbox_config = d.pop("app_sandbox_config", UNSET) + app_sandbox_config: Union[Unset, AppAppSandboxConfig] + if isinstance(_app_sandbox_config, Unset): + app_sandbox_config = UNSET + else: + app_sandbox_config = AppAppSandboxConfig.from_dict(_app_sandbox_config) + + created_at = d.pop("created_at", UNSET) + + _created_by = d.pop("created_by", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + install_sandbox_id = d.pop("install_sandbox_id", UNSET) + + install_workflow_id = d.pop("install_workflow_id", UNSET) + + _log_stream = d.pop("log_stream", UNSET) + log_stream: Union[Unset, AppLogStream] + if isinstance(_log_stream, Unset): + log_stream = UNSET + else: + log_stream = AppLogStream.from_dict(_log_stream) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, AppInstallSandboxRunOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = AppInstallSandboxRunOutputs.from_dict(_outputs) + + _run_type = d.pop("run_type", UNSET) + run_type: Union[Unset, AppSandboxRunType] + if isinstance(_run_type, Unset): + run_type = UNSET + else: + run_type = AppSandboxRunType(_run_type) + + runner_jobs = [] + _runner_jobs = d.pop("runner_jobs", UNSET) + for runner_jobs_item_data in _runner_jobs or []: + runner_jobs_item = AppRunnerJob.from_dict(runner_jobs_item_data) + + runner_jobs.append(runner_jobs_item) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + _status_v2 = d.pop("status_v2", UNSET) + status_v2: Union[Unset, AppCompositeStatus] + if isinstance(_status_v2, Unset): + status_v2 = UNSET + else: + status_v2 = AppCompositeStatus.from_dict(_status_v2) + + updated_at = d.pop("updated_at", UNSET) + + _workflow = d.pop("workflow", UNSET) + workflow: Union[Unset, AppWorkflow] + if isinstance(_workflow, Unset): + workflow = UNSET + else: + workflow = AppWorkflow.from_dict(_workflow) + + workflow_id = d.pop("workflow_id", UNSET) + + app_install_sandbox_run = cls( + action_workflow_runs=action_workflow_runs, + app_sandbox_config=app_sandbox_config, + created_at=created_at, + created_by=created_by, + created_by_id=created_by_id, + id=id, + install_id=install_id, + install_sandbox_id=install_sandbox_id, + install_workflow_id=install_workflow_id, + log_stream=log_stream, + outputs=outputs, + run_type=run_type, + runner_jobs=runner_jobs, + status=status, + status_description=status_description, + status_v2=status_v2, + updated_at=updated_at, + workflow=workflow, + workflow_id=workflow_id, + ) + + app_install_sandbox_run.additional_properties = d + return app_install_sandbox_run + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_sandbox_run_outputs.py b/nuon/models/app_install_sandbox_run_outputs.py new file mode 100644 index 00000000..7eb0d92a --- /dev/null +++ b/nuon/models/app_install_sandbox_run_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallSandboxRunOutputs") + + +@_attrs_define +class AppInstallSandboxRunOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_sandbox_run_outputs = cls() + + app_install_sandbox_run_outputs.additional_properties = d + return app_install_sandbox_run_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack.py b/nuon/models/app_install_stack.py new file mode 100644 index 00000000..9b8ac9f4 --- /dev/null +++ b/nuon/models/app_install_stack.py @@ -0,0 +1,147 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_install_stack_outputs import AppInstallStackOutputs + from ..models.app_install_stack_version import AppInstallStackVersion + + +T = TypeVar("T", bound="AppInstallStack") + + +@_attrs_define +class AppInstallStack: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_stack_outputs (Union[Unset, AppInstallStackOutputs]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + versions (Union[Unset, list['AppInstallStackVersion']]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_stack_outputs: Union[Unset, "AppInstallStackOutputs"] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + versions: Union[Unset, list["AppInstallStackVersion"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + install_stack_outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_stack_outputs, Unset): + install_stack_outputs = self.install_stack_outputs.to_dict() + + org_id = self.org_id + + updated_at = self.updated_at + + versions: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item = versions_item_data.to_dict() + versions.append(versions_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_stack_outputs is not UNSET: + field_dict["install_stack_outputs"] = install_stack_outputs + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if versions is not UNSET: + field_dict["versions"] = versions + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_install_stack_outputs import AppInstallStackOutputs + from ..models.app_install_stack_version import AppInstallStackVersion + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + _install_stack_outputs = d.pop("install_stack_outputs", UNSET) + install_stack_outputs: Union[Unset, AppInstallStackOutputs] + if isinstance(_install_stack_outputs, Unset): + install_stack_outputs = UNSET + else: + install_stack_outputs = AppInstallStackOutputs.from_dict(_install_stack_outputs) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + for versions_item_data in _versions or []: + versions_item = AppInstallStackVersion.from_dict(versions_item_data) + + versions.append(versions_item) + + app_install_stack = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + install_stack_outputs=install_stack_outputs, + org_id=org_id, + updated_at=updated_at, + versions=versions, + ) + + app_install_stack.additional_properties = d + return app_install_stack + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_outputs.py b/nuon/models/app_install_stack_outputs.py new file mode 100644 index 00000000..abceb687 --- /dev/null +++ b/nuon/models/app_install_stack_outputs.py @@ -0,0 +1,189 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_aws_stack_outputs import AppAWSStackOutputs + from ..models.app_azure_stack_outputs import AppAzureStackOutputs + from ..models.app_install_stack_outputs_data import AppInstallStackOutputsData + from ..models.app_install_stack_outputs_data_contents import AppInstallStackOutputsDataContents + + +T = TypeVar("T", bound="AppInstallStackOutputs") + + +@_attrs_define +class AppInstallStackOutputs: + """ + Attributes: + aws (Union[Unset, AppAWSStackOutputs]): + azure (Union[Unset, AppAzureStackOutputs]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + data (Union[Unset, AppInstallStackOutputsData]): + data_contents (Union[Unset, AppInstallStackOutputsDataContents]): + id (Union[Unset, str]): + install_stack_id (Union[Unset, str]): + install_version_run_id (Union[Unset, str]): + org_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + aws: Union[Unset, "AppAWSStackOutputs"] = UNSET + azure: Union[Unset, "AppAzureStackOutputs"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + data: Union[Unset, "AppInstallStackOutputsData"] = UNSET + data_contents: Union[Unset, "AppInstallStackOutputsDataContents"] = UNSET + id: Union[Unset, str] = UNSET + install_stack_id: Union[Unset, str] = UNSET + install_version_run_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws, Unset): + aws = self.aws.to_dict() + + azure: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure, Unset): + azure = self.azure.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + data: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + data_contents: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.data_contents, Unset): + data_contents = self.data_contents.to_dict() + + id = self.id + + install_stack_id = self.install_stack_id + + install_version_run_id = self.install_version_run_id + + org_id = self.org_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws is not UNSET: + field_dict["aws"] = aws + if azure is not UNSET: + field_dict["azure"] = azure + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if data is not UNSET: + field_dict["data"] = data + if data_contents is not UNSET: + field_dict["data_contents"] = data_contents + if id is not UNSET: + field_dict["id"] = id + if install_stack_id is not UNSET: + field_dict["install_stack_id"] = install_stack_id + if install_version_run_id is not UNSET: + field_dict["install_version_run_id"] = install_version_run_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_aws_stack_outputs import AppAWSStackOutputs + from ..models.app_azure_stack_outputs import AppAzureStackOutputs + from ..models.app_install_stack_outputs_data import AppInstallStackOutputsData + from ..models.app_install_stack_outputs_data_contents import AppInstallStackOutputsDataContents + + d = dict(src_dict) + _aws = d.pop("aws", UNSET) + aws: Union[Unset, AppAWSStackOutputs] + if isinstance(_aws, Unset): + aws = UNSET + else: + aws = AppAWSStackOutputs.from_dict(_aws) + + _azure = d.pop("azure", UNSET) + azure: Union[Unset, AppAzureStackOutputs] + if isinstance(_azure, Unset): + azure = UNSET + else: + azure = AppAzureStackOutputs.from_dict(_azure) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _data = d.pop("data", UNSET) + data: Union[Unset, AppInstallStackOutputsData] + if isinstance(_data, Unset): + data = UNSET + else: + data = AppInstallStackOutputsData.from_dict(_data) + + _data_contents = d.pop("data_contents", UNSET) + data_contents: Union[Unset, AppInstallStackOutputsDataContents] + if isinstance(_data_contents, Unset): + data_contents = UNSET + else: + data_contents = AppInstallStackOutputsDataContents.from_dict(_data_contents) + + id = d.pop("id", UNSET) + + install_stack_id = d.pop("install_stack_id", UNSET) + + install_version_run_id = d.pop("install_version_run_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_install_stack_outputs = cls( + aws=aws, + azure=azure, + created_at=created_at, + created_by_id=created_by_id, + data=data, + data_contents=data_contents, + id=id, + install_stack_id=install_stack_id, + install_version_run_id=install_version_run_id, + org_id=org_id, + updated_at=updated_at, + ) + + app_install_stack_outputs.additional_properties = d + return app_install_stack_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_outputs_data.py b/nuon/models/app_install_stack_outputs_data.py new file mode 100644 index 00000000..2246ce36 --- /dev/null +++ b/nuon/models/app_install_stack_outputs_data.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallStackOutputsData") + + +@_attrs_define +class AppInstallStackOutputsData: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_stack_outputs_data = cls() + + app_install_stack_outputs_data.additional_properties = d + return app_install_stack_outputs_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_outputs_data_contents.py b/nuon/models/app_install_stack_outputs_data_contents.py new file mode 100644 index 00000000..cf60adf7 --- /dev/null +++ b/nuon/models/app_install_stack_outputs_data_contents.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallStackOutputsDataContents") + + +@_attrs_define +class AppInstallStackOutputsDataContents: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_stack_outputs_data_contents = cls() + + app_install_stack_outputs_data_contents.additional_properties = d + return app_install_stack_outputs_data_contents + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version.py b/nuon/models/app_install_stack_version.py new file mode 100644 index 00000000..5b744cc2 --- /dev/null +++ b/nuon/models/app_install_stack_version.py @@ -0,0 +1,237 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_stack_version_run import AppInstallStackVersionRun + + +T = TypeVar("T", bound="AppInstallStackVersion") + + +@_attrs_define +class AppInstallStackVersion: + """ + Attributes: + app_config_id (Union[Unset, str]): + aws_bucket_key (Union[Unset, str]): + aws_bucket_name (Union[Unset, str]): aws configuration parameters + checksum (Union[Unset, str]): + composite_status (Union[Unset, AppCompositeStatus]): + contents (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_stack_id (Union[Unset, str]): + org_id (Union[Unset, str]): + phone_home_id (Union[Unset, str]): + phone_home_url (Union[Unset, str]): + quick_link_url (Union[Unset, str]): + runs (Union[Unset, list['AppInstallStackVersionRun']]): + template_url (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + app_config_id: Union[Unset, str] = UNSET + aws_bucket_key: Union[Unset, str] = UNSET + aws_bucket_name: Union[Unset, str] = UNSET + checksum: Union[Unset, str] = UNSET + composite_status: Union[Unset, "AppCompositeStatus"] = UNSET + contents: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_stack_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + phone_home_id: Union[Unset, str] = UNSET + phone_home_url: Union[Unset, str] = UNSET + quick_link_url: Union[Unset, str] = UNSET + runs: Union[Unset, list["AppInstallStackVersionRun"]] = UNSET + template_url: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + aws_bucket_key = self.aws_bucket_key + + aws_bucket_name = self.aws_bucket_name + + checksum = self.checksum + + composite_status: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.composite_status, Unset): + composite_status = self.composite_status.to_dict() + + contents = self.contents + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + install_stack_id = self.install_stack_id + + org_id = self.org_id + + phone_home_id = self.phone_home_id + + phone_home_url = self.phone_home_url + + quick_link_url = self.quick_link_url + + runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.runs, Unset): + runs = [] + for runs_item_data in self.runs: + runs_item = runs_item_data.to_dict() + runs.append(runs_item) + + template_url = self.template_url + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if aws_bucket_key is not UNSET: + field_dict["aws_bucket_key"] = aws_bucket_key + if aws_bucket_name is not UNSET: + field_dict["aws_bucket_name"] = aws_bucket_name + if checksum is not UNSET: + field_dict["checksum"] = checksum + if composite_status is not UNSET: + field_dict["composite_status"] = composite_status + if contents is not UNSET: + field_dict["contents"] = contents + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_stack_id is not UNSET: + field_dict["install_stack_id"] = install_stack_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if phone_home_id is not UNSET: + field_dict["phone_home_id"] = phone_home_id + if phone_home_url is not UNSET: + field_dict["phone_home_url"] = phone_home_url + if quick_link_url is not UNSET: + field_dict["quick_link_url"] = quick_link_url + if runs is not UNSET: + field_dict["runs"] = runs + if template_url is not UNSET: + field_dict["template_url"] = template_url + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_stack_version_run import AppInstallStackVersionRun + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + aws_bucket_key = d.pop("aws_bucket_key", UNSET) + + aws_bucket_name = d.pop("aws_bucket_name", UNSET) + + checksum = d.pop("checksum", UNSET) + + _composite_status = d.pop("composite_status", UNSET) + composite_status: Union[Unset, AppCompositeStatus] + if isinstance(_composite_status, Unset): + composite_status = UNSET + else: + composite_status = AppCompositeStatus.from_dict(_composite_status) + + contents = d.pop("contents", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + install_stack_id = d.pop("install_stack_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + phone_home_id = d.pop("phone_home_id", UNSET) + + phone_home_url = d.pop("phone_home_url", UNSET) + + quick_link_url = d.pop("quick_link_url", UNSET) + + runs = [] + _runs = d.pop("runs", UNSET) + for runs_item_data in _runs or []: + runs_item = AppInstallStackVersionRun.from_dict(runs_item_data) + + runs.append(runs_item) + + template_url = d.pop("template_url", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_install_stack_version = cls( + app_config_id=app_config_id, + aws_bucket_key=aws_bucket_key, + aws_bucket_name=aws_bucket_name, + checksum=checksum, + composite_status=composite_status, + contents=contents, + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + install_stack_id=install_stack_id, + org_id=org_id, + phone_home_id=phone_home_id, + phone_home_url=phone_home_url, + quick_link_url=quick_link_url, + runs=runs, + template_url=template_url, + updated_at=updated_at, + ) + + app_install_stack_version.additional_properties = d + return app_install_stack_version + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version_run.py b/nuon/models/app_install_stack_version_run.py new file mode 100644 index 00000000..9ced1e0b --- /dev/null +++ b/nuon/models/app_install_stack_version_run.py @@ -0,0 +1,126 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_install_stack_version_run_data import AppInstallStackVersionRunData + from ..models.app_install_stack_version_run_data_contents import AppInstallStackVersionRunDataContents + + +T = TypeVar("T", bound="AppInstallStackVersionRun") + + +@_attrs_define +class AppInstallStackVersionRun: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + data (Union[Unset, AppInstallStackVersionRunData]): + data_contents (Union[Unset, AppInstallStackVersionRunDataContents]): + id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + data: Union[Unset, "AppInstallStackVersionRunData"] = UNSET + data_contents: Union[Unset, "AppInstallStackVersionRunDataContents"] = UNSET + id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + data: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + data_contents: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.data_contents, Unset): + data_contents = self.data_contents.to_dict() + + id = self.id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if data is not UNSET: + field_dict["data"] = data + if data_contents is not UNSET: + field_dict["data_contents"] = data_contents + if id is not UNSET: + field_dict["id"] = id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_install_stack_version_run_data import AppInstallStackVersionRunData + from ..models.app_install_stack_version_run_data_contents import AppInstallStackVersionRunDataContents + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _data = d.pop("data", UNSET) + data: Union[Unset, AppInstallStackVersionRunData] + if isinstance(_data, Unset): + data = UNSET + else: + data = AppInstallStackVersionRunData.from_dict(_data) + + _data_contents = d.pop("data_contents", UNSET) + data_contents: Union[Unset, AppInstallStackVersionRunDataContents] + if isinstance(_data_contents, Unset): + data_contents = UNSET + else: + data_contents = AppInstallStackVersionRunDataContents.from_dict(_data_contents) + + id = d.pop("id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_install_stack_version_run = cls( + created_at=created_at, + created_by_id=created_by_id, + data=data, + data_contents=data_contents, + id=id, + updated_at=updated_at, + ) + + app_install_stack_version_run.additional_properties = d + return app_install_stack_version_run + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version_run_data.py b/nuon/models/app_install_stack_version_run_data.py new file mode 100644 index 00000000..5da3fe66 --- /dev/null +++ b/nuon/models/app_install_stack_version_run_data.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallStackVersionRunData") + + +@_attrs_define +class AppInstallStackVersionRunData: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_stack_version_run_data = cls() + + app_install_stack_version_run_data.additional_properties = d + return app_install_stack_version_run_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_stack_version_run_data_contents.py b/nuon/models/app_install_stack_version_run_data_contents.py new file mode 100644 index 00000000..90c4f8f8 --- /dev/null +++ b/nuon/models/app_install_stack_version_run_data_contents.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppInstallStackVersionRunDataContents") + + +@_attrs_define +class AppInstallStackVersionRunDataContents: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_install_stack_version_run_data_contents = cls() + + app_install_stack_version_run_data_contents.additional_properties = d + return app_install_stack_version_run_data_contents + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_install_state.py b/nuon/models/app_install_state.py new file mode 100644 index 00000000..692ab245 --- /dev/null +++ b/nuon/models/app_install_state.py @@ -0,0 +1,162 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.generics_null_time import GenericsNullTime + + +T = TypeVar("T", bound="AppInstallState") + + +@_attrs_define +class AppInstallState: + """ + Attributes: + archived (Union[Unset, bool]): + contents (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + stale_at (Union[Unset, GenericsNullTime]): + triggered_by_id (Union[Unset, str]): + triggered_by_type (Union[Unset, str]): + updated_at (Union[Unset, str]): + version (Union[Unset, int]): + """ + + archived: Union[Unset, bool] = UNSET + contents: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + stale_at: Union[Unset, "GenericsNullTime"] = UNSET + triggered_by_id: Union[Unset, str] = UNSET + triggered_by_type: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + version: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + archived = self.archived + + contents = self.contents + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_id = self.install_id + + stale_at: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.stale_at, Unset): + stale_at = self.stale_at.to_dict() + + triggered_by_id = self.triggered_by_id + + triggered_by_type = self.triggered_by_type + + updated_at = self.updated_at + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if archived is not UNSET: + field_dict["archived"] = archived + if contents is not UNSET: + field_dict["contents"] = contents + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if stale_at is not UNSET: + field_dict["stale_at"] = stale_at + if triggered_by_id is not UNSET: + field_dict["triggered_by_id"] = triggered_by_id + if triggered_by_type is not UNSET: + field_dict["triggered_by_type"] = triggered_by_type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.generics_null_time import GenericsNullTime + + d = dict(src_dict) + archived = d.pop("archived", UNSET) + + contents = d.pop("contents", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + _stale_at = d.pop("stale_at", UNSET) + stale_at: Union[Unset, GenericsNullTime] + if isinstance(_stale_at, Unset): + stale_at = UNSET + else: + stale_at = GenericsNullTime.from_dict(_stale_at) + + triggered_by_id = d.pop("triggered_by_id", UNSET) + + triggered_by_type = d.pop("triggered_by_type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + version = d.pop("version", UNSET) + + app_install_state = cls( + archived=archived, + contents=contents, + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_id=install_id, + stale_at=stale_at, + triggered_by_id=triggered_by_id, + triggered_by_type=triggered_by_type, + updated_at=updated_at, + version=version, + ) + + app_install_state.additional_properties = d + return app_install_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_installer.py b/nuon/models/app_installer.py new file mode 100644 index 00000000..fa309ba5 --- /dev/null +++ b/nuon/models/app_installer.py @@ -0,0 +1,155 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_installer_type import AppInstallerType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app import AppApp + from ..models.app_installer_metadata import AppInstallerMetadata + + +T = TypeVar("T", bound="AppInstaller") + + +@_attrs_define +class AppInstaller: + """ + Attributes: + apps (Union[Unset, list['AppApp']]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + metadata (Union[Unset, AppInstallerMetadata]): + org_id (Union[Unset, str]): + type_ (Union[Unset, AppInstallerType]): + updated_at (Union[Unset, str]): + """ + + apps: Union[Unset, list["AppApp"]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + metadata: Union[Unset, "AppInstallerMetadata"] = UNSET + org_id: Union[Unset, str] = UNSET + type_: Union[Unset, AppInstallerType] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + apps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.apps, Unset): + apps = [] + for apps_item_data in self.apps: + apps_item = apps_item_data.to_dict() + apps.append(apps_item) + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + org_id = self.org_id + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if apps is not UNSET: + field_dict["apps"] = apps + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if metadata is not UNSET: + field_dict["metadata"] = metadata + if org_id is not UNSET: + field_dict["org_id"] = org_id + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app import AppApp + from ..models.app_installer_metadata import AppInstallerMetadata + + d = dict(src_dict) + apps = [] + _apps = d.pop("apps", UNSET) + for apps_item_data in _apps or []: + apps_item = AppApp.from_dict(apps_item_data) + + apps.append(apps_item) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppInstallerMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppInstallerMetadata.from_dict(_metadata) + + org_id = d.pop("org_id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppInstallerType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppInstallerType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + app_installer = cls( + apps=apps, + created_at=created_at, + created_by_id=created_by_id, + id=id, + metadata=metadata, + org_id=org_id, + type_=type_, + updated_at=updated_at, + ) + + app_installer.additional_properties = d + return app_installer + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_installer_metadata.py b/nuon/models/app_installer_metadata.py new file mode 100644 index 00000000..3d62b45e --- /dev/null +++ b/nuon/models/app_installer_metadata.py @@ -0,0 +1,221 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppInstallerMetadata") + + +@_attrs_define +class AppInstallerMetadata: + """ + Attributes: + community_url (Union[Unset, str]): + copyright_markdown (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + demo_url (Union[Unset, str]): + description (Union[Unset, str]): + documentation_url (Union[Unset, str]): + favicon_url (Union[Unset, str]): + footer_markdown (Union[Unset, str]): + formatted_demo_url (Union[Unset, str]): + github_url (Union[Unset, str]): + homepage_url (Union[Unset, str]): + id (Union[Unset, str]): + installer_id (Union[Unset, str]): + logo_url (Union[Unset, str]): + name (Union[Unset, str]): + og_image_url (Union[Unset, str]): + post_install_markdown (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + community_url: Union[Unset, str] = UNSET + copyright_markdown: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + demo_url: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + documentation_url: Union[Unset, str] = UNSET + favicon_url: Union[Unset, str] = UNSET + footer_markdown: Union[Unset, str] = UNSET + formatted_demo_url: Union[Unset, str] = UNSET + github_url: Union[Unset, str] = UNSET + homepage_url: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + installer_id: Union[Unset, str] = UNSET + logo_url: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + og_image_url: Union[Unset, str] = UNSET + post_install_markdown: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + community_url = self.community_url + + copyright_markdown = self.copyright_markdown + + created_at = self.created_at + + created_by_id = self.created_by_id + + demo_url = self.demo_url + + description = self.description + + documentation_url = self.documentation_url + + favicon_url = self.favicon_url + + footer_markdown = self.footer_markdown + + formatted_demo_url = self.formatted_demo_url + + github_url = self.github_url + + homepage_url = self.homepage_url + + id = self.id + + installer_id = self.installer_id + + logo_url = self.logo_url + + name = self.name + + og_image_url = self.og_image_url + + post_install_markdown = self.post_install_markdown + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if community_url is not UNSET: + field_dict["community_url"] = community_url + if copyright_markdown is not UNSET: + field_dict["copyright_markdown"] = copyright_markdown + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if demo_url is not UNSET: + field_dict["demo_url"] = demo_url + if description is not UNSET: + field_dict["description"] = description + if documentation_url is not UNSET: + field_dict["documentation_url"] = documentation_url + if favicon_url is not UNSET: + field_dict["favicon_url"] = favicon_url + if footer_markdown is not UNSET: + field_dict["footer_markdown"] = footer_markdown + if formatted_demo_url is not UNSET: + field_dict["formatted_demo_url"] = formatted_demo_url + if github_url is not UNSET: + field_dict["github_url"] = github_url + if homepage_url is not UNSET: + field_dict["homepage_url"] = homepage_url + if id is not UNSET: + field_dict["id"] = id + if installer_id is not UNSET: + field_dict["installer_id"] = installer_id + if logo_url is not UNSET: + field_dict["logo_url"] = logo_url + if name is not UNSET: + field_dict["name"] = name + if og_image_url is not UNSET: + field_dict["og_image_url"] = og_image_url + if post_install_markdown is not UNSET: + field_dict["post_install_markdown"] = post_install_markdown + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + community_url = d.pop("community_url", UNSET) + + copyright_markdown = d.pop("copyright_markdown", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + demo_url = d.pop("demo_url", UNSET) + + description = d.pop("description", UNSET) + + documentation_url = d.pop("documentation_url", UNSET) + + favicon_url = d.pop("favicon_url", UNSET) + + footer_markdown = d.pop("footer_markdown", UNSET) + + formatted_demo_url = d.pop("formatted_demo_url", UNSET) + + github_url = d.pop("github_url", UNSET) + + homepage_url = d.pop("homepage_url", UNSET) + + id = d.pop("id", UNSET) + + installer_id = d.pop("installer_id", UNSET) + + logo_url = d.pop("logo_url", UNSET) + + name = d.pop("name", UNSET) + + og_image_url = d.pop("og_image_url", UNSET) + + post_install_markdown = d.pop("post_install_markdown", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_installer_metadata = cls( + community_url=community_url, + copyright_markdown=copyright_markdown, + created_at=created_at, + created_by_id=created_by_id, + demo_url=demo_url, + description=description, + documentation_url=documentation_url, + favicon_url=favicon_url, + footer_markdown=footer_markdown, + formatted_demo_url=formatted_demo_url, + github_url=github_url, + homepage_url=homepage_url, + id=id, + installer_id=installer_id, + logo_url=logo_url, + name=name, + og_image_url=og_image_url, + post_install_markdown=post_install_markdown, + updated_at=updated_at, + ) + + app_installer_metadata.additional_properties = d + return app_installer_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/nuon/models/app_installer_type.py b/nuon/models/app_installer_type.py new file mode 100644 index 00000000..e2c76e61 --- /dev/null +++ b/nuon/models/app_installer_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AppInstallerType(str, Enum): + SELF_HOSTED = "self_hosted" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_job_component_config.py b/nuon/models/app_job_component_config.py new file mode 100644 index 00000000..f3072908 --- /dev/null +++ b/nuon/models/app_job_component_config.py @@ -0,0 +1,157 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_job_component_config_env_vars import AppJobComponentConfigEnvVars + + +T = TypeVar("T", bound="AppJobComponentConfig") + + +@_attrs_define +class AppJobComponentConfig: + """ + Attributes: + args (Union[Unset, list[str]]): + cmd (Union[Unset, list[str]]): + component_config_connection_id (Union[Unset, str]): value + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + env_vars (Union[Unset, AppJobComponentConfigEnvVars]): + id (Union[Unset, str]): + image_url (Union[Unset, str]): Image attributes, copied from a docker_buid or external_image component. + tag (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + args: Union[Unset, list[str]] = UNSET + cmd: Union[Unset, list[str]] = UNSET + component_config_connection_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + env_vars: Union[Unset, "AppJobComponentConfigEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + image_url: Union[Unset, str] = UNSET + tag: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + args: Union[Unset, list[str]] = UNSET + if not isinstance(self.args, Unset): + args = self.args + + cmd: Union[Unset, list[str]] = UNSET + if not isinstance(self.cmd, Unset): + cmd = self.cmd + + component_config_connection_id = self.component_config_connection_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + image_url = self.image_url + + tag = self.tag + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if args is not UNSET: + field_dict["args"] = args + if cmd is not UNSET: + field_dict["cmd"] = cmd + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if image_url is not UNSET: + field_dict["image_url"] = image_url + if tag is not UNSET: + field_dict["tag"] = tag + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_job_component_config_env_vars import AppJobComponentConfigEnvVars + + d = dict(src_dict) + args = cast(list[str], d.pop("args", UNSET)) + + cmd = cast(list[str], d.pop("cmd", UNSET)) + + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, AppJobComponentConfigEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = AppJobComponentConfigEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + image_url = d.pop("image_url", UNSET) + + tag = d.pop("tag", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_job_component_config = cls( + args=args, + cmd=cmd, + component_config_connection_id=component_config_connection_id, + created_at=created_at, + created_by_id=created_by_id, + env_vars=env_vars, + id=id, + image_url=image_url, + tag=tag, + updated_at=updated_at, + ) + + app_job_component_config.additional_properties = d + return app_job_component_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_job_component_config_env_vars.py b/nuon/models/app_job_component_config_env_vars.py new file mode 100644 index 00000000..d9e22238 --- /dev/null +++ b/nuon/models/app_job_component_config_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppJobComponentConfigEnvVars") + + +@_attrs_define +class AppJobComponentConfigEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_job_component_config_env_vars = cls() + + app_job_component_config_env_vars.additional_properties = d + return app_job_component_config_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_json_map.py b/nuon/models/app_json_map.py new file mode 100644 index 00000000..7a5e56ba --- /dev/null +++ b/nuon/models/app_json_map.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppJSONMap") + + +@_attrs_define +class AppJSONMap: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_json_map = cls() + + app_json_map.additional_properties = d + return app_json_map + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_kubernetes_manifest_component_config.py b/nuon/models/app_kubernetes_manifest_component_config.py new file mode 100644 index 00000000..c3f334eb --- /dev/null +++ b/nuon/models/app_kubernetes_manifest_component_config.py @@ -0,0 +1,113 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppKubernetesManifestComponentConfig") + + +@_attrs_define +class AppKubernetesManifestComponentConfig: + """ + Attributes: + component_config_connection_id (Union[Unset, str]): value + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + manifest (Union[Unset, str]): + namespace (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + component_config_connection_id: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + manifest: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + component_config_connection_id = self.component_config_connection_id + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + manifest = self.manifest + + namespace = self.namespace + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if manifest is not UNSET: + field_dict["manifest"] = manifest + if namespace is not UNSET: + field_dict["namespace"] = namespace + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + manifest = d.pop("manifest", UNSET) + + namespace = d.pop("namespace", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_kubernetes_manifest_component_config = cls( + component_config_connection_id=component_config_connection_id, + created_at=created_at, + created_by_id=created_by_id, + id=id, + manifest=manifest, + namespace=namespace, + updated_at=updated_at, + ) + + app_kubernetes_manifest_component_config.additional_properties = d + return app_kubernetes_manifest_component_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_latest_runner_heart_beat.py b/nuon/models/app_latest_runner_heart_beat.py new file mode 100644 index 00000000..605c82fc --- /dev/null +++ b/nuon/models/app_latest_runner_heart_beat.py @@ -0,0 +1,104 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppLatestRunnerHeartBeat") + + +@_attrs_define +class AppLatestRunnerHeartBeat: + """ + Attributes: + alive_time (Union[Unset, int]): + created_at (Union[Unset, str]): + process (Union[Unset, str]): + runner_id (Union[Unset, str]): + started_at (Union[Unset, str]): + version (Union[Unset, str]): + """ + + alive_time: Union[Unset, int] = UNSET + created_at: Union[Unset, str] = UNSET + process: Union[Unset, str] = UNSET + runner_id: Union[Unset, str] = UNSET + started_at: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + alive_time = self.alive_time + + created_at = self.created_at + + process = self.process + + runner_id = self.runner_id + + started_at = self.started_at + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if alive_time is not UNSET: + field_dict["alive_time"] = alive_time + if created_at is not UNSET: + field_dict["created_at"] = created_at + if process is not UNSET: + field_dict["process"] = process + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if started_at is not UNSET: + field_dict["started_at"] = started_at + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + alive_time = d.pop("alive_time", UNSET) + + created_at = d.pop("created_at", UNSET) + + process = d.pop("process", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + started_at = d.pop("started_at", UNSET) + + version = d.pop("version", UNSET) + + app_latest_runner_heart_beat = cls( + alive_time=alive_time, + created_at=created_at, + process=process, + runner_id=runner_id, + started_at=started_at, + version=version, + ) + + app_latest_runner_heart_beat.additional_properties = d + return app_latest_runner_heart_beat + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_log_stream.py b/nuon/models/app_log_stream.py new file mode 100644 index 00000000..91252074 --- /dev/null +++ b/nuon/models/app_log_stream.py @@ -0,0 +1,162 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_log_stream_attrs import AppLogStreamAttrs + + +T = TypeVar("T", bound="AppLogStream") + + +@_attrs_define +class AppLogStream: + """ + Attributes: + attrs (Union[Unset, AppLogStreamAttrs]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + open_ (Union[Unset, bool]): + org_id (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + runner_api_url (Union[Unset, str]): + updated_at (Union[Unset, str]): + write_token (Union[Unset, str]): + """ + + attrs: Union[Unset, "AppLogStreamAttrs"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + open_: Union[Unset, bool] = UNSET + org_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + runner_api_url: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + write_token: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attrs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.attrs, Unset): + attrs = self.attrs.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + open_ = self.open_ + + org_id = self.org_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + runner_api_url = self.runner_api_url + + updated_at = self.updated_at + + write_token = self.write_token + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attrs is not UNSET: + field_dict["attrs"] = attrs + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if open_ is not UNSET: + field_dict["open"] = open_ + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if runner_api_url is not UNSET: + field_dict["runner_api_url"] = runner_api_url + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if write_token is not UNSET: + field_dict["write_token"] = write_token + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_log_stream_attrs import AppLogStreamAttrs + + d = dict(src_dict) + _attrs = d.pop("attrs", UNSET) + attrs: Union[Unset, AppLogStreamAttrs] + if isinstance(_attrs, Unset): + attrs = UNSET + else: + attrs = AppLogStreamAttrs.from_dict(_attrs) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + open_ = d.pop("open", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + runner_api_url = d.pop("runner_api_url", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + write_token = d.pop("write_token", UNSET) + + app_log_stream = cls( + attrs=attrs, + created_at=created_at, + created_by_id=created_by_id, + id=id, + open_=open_, + org_id=org_id, + owner_id=owner_id, + owner_type=owner_type, + runner_api_url=runner_api_url, + updated_at=updated_at, + write_token=write_token, + ) + + app_log_stream.additional_properties = d + return app_log_stream + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_log_stream_attrs.py b/nuon/models/app_log_stream_attrs.py new file mode 100644 index 00000000..01b8718e --- /dev/null +++ b/nuon/models/app_log_stream_attrs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppLogStreamAttrs") + + +@_attrs_define +class AppLogStreamAttrs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_log_stream_attrs = cls() + + app_log_stream_attrs.additional_properties = d + return app_log_stream_attrs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_notifications_config.py b/nuon/models/app_notifications_config.py new file mode 100644 index 00000000..7826cfc4 --- /dev/null +++ b/nuon/models/app_notifications_config.py @@ -0,0 +1,122 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppNotificationsConfig") + + +@_attrs_define +class AppNotificationsConfig: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + slack_webhook_url (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + slack_webhook_url: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + slack_webhook_url = self.slack_webhook_url + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if slack_webhook_url is not UNSET: + field_dict["slack_webhook_url"] = slack_webhook_url + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + slack_webhook_url = d.pop("slack_webhook_url", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_notifications_config = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + owner_id=owner_id, + owner_type=owner_type, + slack_webhook_url=slack_webhook_url, + updated_at=updated_at, + ) + + app_notifications_config.additional_properties = d + return app_notifications_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_oci_artifact.py b/nuon/models/app_oci_artifact.py new file mode 100644 index 00000000..b1e95392 --- /dev/null +++ b/nuon/models/app_oci_artifact.py @@ -0,0 +1,247 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_oci_artifact_annotations import AppOCIArtifactAnnotations + + +T = TypeVar("T", bound="AppOCIArtifact") + + +@_attrs_define +class AppOCIArtifact: + """ + Attributes: + annotations (Union[Unset, AppOCIArtifactAnnotations]): + architecture (Union[Unset, str]): + artifact_type (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + digest (Union[Unset, str]): + id (Union[Unset, str]): + media_type (Union[Unset, str]): + org_id (Union[Unset, str]): + os (Union[Unset, str]): Platform fields + os_features (Union[Unset, list[str]]): + os_version (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + repository (Union[Unset, str]): + size (Union[Unset, int]): + tag (Union[Unset, str]): + updated_at (Union[Unset, str]): + urls (Union[Unset, list[str]]): + variant (Union[Unset, str]): + """ + + annotations: Union[Unset, "AppOCIArtifactAnnotations"] = UNSET + architecture: Union[Unset, str] = UNSET + artifact_type: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + digest: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + media_type: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + os: Union[Unset, str] = UNSET + os_features: Union[Unset, list[str]] = UNSET + os_version: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + repository: Union[Unset, str] = UNSET + size: Union[Unset, int] = UNSET + tag: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + urls: Union[Unset, list[str]] = UNSET + variant: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + annotations: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.annotations, Unset): + annotations = self.annotations.to_dict() + + architecture = self.architecture + + artifact_type = self.artifact_type + + created_at = self.created_at + + created_by_id = self.created_by_id + + digest = self.digest + + id = self.id + + media_type = self.media_type + + org_id = self.org_id + + os = self.os + + os_features: Union[Unset, list[str]] = UNSET + if not isinstance(self.os_features, Unset): + os_features = self.os_features + + os_version = self.os_version + + owner_id = self.owner_id + + owner_type = self.owner_type + + repository = self.repository + + size = self.size + + tag = self.tag + + updated_at = self.updated_at + + urls: Union[Unset, list[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls + + variant = self.variant + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotations is not UNSET: + field_dict["annotations"] = annotations + if architecture is not UNSET: + field_dict["architecture"] = architecture + if artifact_type is not UNSET: + field_dict["artifact_type"] = artifact_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if digest is not UNSET: + field_dict["digest"] = digest + if id is not UNSET: + field_dict["id"] = id + if media_type is not UNSET: + field_dict["media_type"] = media_type + if org_id is not UNSET: + field_dict["org_id"] = org_id + if os is not UNSET: + field_dict["os"] = os + if os_features is not UNSET: + field_dict["os_features"] = os_features + if os_version is not UNSET: + field_dict["os_version"] = os_version + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if repository is not UNSET: + field_dict["repository"] = repository + if size is not UNSET: + field_dict["size"] = size + if tag is not UNSET: + field_dict["tag"] = tag + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if urls is not UNSET: + field_dict["urls"] = urls + if variant is not UNSET: + field_dict["variant"] = variant + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_oci_artifact_annotations import AppOCIArtifactAnnotations + + d = dict(src_dict) + _annotations = d.pop("annotations", UNSET) + annotations: Union[Unset, AppOCIArtifactAnnotations] + if isinstance(_annotations, Unset): + annotations = UNSET + else: + annotations = AppOCIArtifactAnnotations.from_dict(_annotations) + + architecture = d.pop("architecture", UNSET) + + artifact_type = d.pop("artifact_type", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + digest = d.pop("digest", UNSET) + + id = d.pop("id", UNSET) + + media_type = d.pop("media_type", UNSET) + + org_id = d.pop("org_id", UNSET) + + os = d.pop("os", UNSET) + + os_features = cast(list[str], d.pop("os_features", UNSET)) + + os_version = d.pop("os_version", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + repository = d.pop("repository", UNSET) + + size = d.pop("size", UNSET) + + tag = d.pop("tag", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + urls = cast(list[str], d.pop("urls", UNSET)) + + variant = d.pop("variant", UNSET) + + app_oci_artifact = cls( + annotations=annotations, + architecture=architecture, + artifact_type=artifact_type, + created_at=created_at, + created_by_id=created_by_id, + digest=digest, + id=id, + media_type=media_type, + org_id=org_id, + os=os, + os_features=os_features, + os_version=os_version, + owner_id=owner_id, + owner_type=owner_type, + repository=repository, + size=size, + tag=tag, + updated_at=updated_at, + urls=urls, + variant=variant, + ) + + app_oci_artifact.additional_properties = d + return app_oci_artifact + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_oci_artifact_annotations.py b/nuon/models/app_oci_artifact_annotations.py new file mode 100644 index 00000000..5cb6ae6d --- /dev/null +++ b/nuon/models/app_oci_artifact_annotations.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppOCIArtifactAnnotations") + + +@_attrs_define +class AppOCIArtifactAnnotations: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_oci_artifact_annotations = cls() + + app_oci_artifact_annotations.additional_properties = d + return app_oci_artifact_annotations + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_operation_status.py b/nuon/models/app_operation_status.py new file mode 100644 index 00000000..a04def93 --- /dev/null +++ b/nuon/models/app_operation_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AppOperationStatus(str, Enum): + FAILED = "failed" + FINISHED = "finished" + NOOP = "noop" + STARTED = "started" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_org.py b/nuon/models/app_org.py new file mode 100644 index 00000000..833cbce6 --- /dev/null +++ b/nuon/models/app_org.py @@ -0,0 +1,228 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_notifications_config import AppNotificationsConfig + from ..models.app_org_links import AppOrgLinks + from ..models.app_runner_group import AppRunnerGroup + from ..models.app_vcs_connection import AppVCSConnection + from ..models.types_string_bool_map import TypesStringBoolMap + + +T = TypeVar("T", bound="AppOrg") + + +@_attrs_define +class AppOrg: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + features (Union[Unset, TypesStringBoolMap]): + id (Union[Unset, str]): + links (Union[Unset, AppOrgLinks]): + logo_url (Union[Unset, str]): + name (Union[Unset, str]): + notifications_config (Union[Unset, AppNotificationsConfig]): + runner_group (Union[Unset, AppRunnerGroup]): + sandbox_mode (Union[Unset, bool]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + vcs_connections (Union[Unset, list['AppVCSConnection']]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + features: Union[Unset, "TypesStringBoolMap"] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "AppOrgLinks"] = UNSET + logo_url: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + notifications_config: Union[Unset, "AppNotificationsConfig"] = UNSET + runner_group: Union[Unset, "AppRunnerGroup"] = UNSET + sandbox_mode: Union[Unset, bool] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + vcs_connections: Union[Unset, list["AppVCSConnection"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + features: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.features, Unset): + features = self.features.to_dict() + + id = self.id + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + logo_url = self.logo_url + + name = self.name + + notifications_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.notifications_config, Unset): + notifications_config = self.notifications_config.to_dict() + + runner_group: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_group, Unset): + runner_group = self.runner_group.to_dict() + + sandbox_mode = self.sandbox_mode + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + vcs_connections: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.vcs_connections, Unset): + vcs_connections = [] + for vcs_connections_item_data in self.vcs_connections: + vcs_connections_item = vcs_connections_item_data.to_dict() + vcs_connections.append(vcs_connections_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if features is not UNSET: + field_dict["features"] = features + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + if logo_url is not UNSET: + field_dict["logo_url"] = logo_url + if name is not UNSET: + field_dict["name"] = name + if notifications_config is not UNSET: + field_dict["notifications_config"] = notifications_config + if runner_group is not UNSET: + field_dict["runner_group"] = runner_group + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vcs_connections is not UNSET: + field_dict["vcs_connections"] = vcs_connections + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_notifications_config import AppNotificationsConfig + from ..models.app_org_links import AppOrgLinks + from ..models.app_runner_group import AppRunnerGroup + from ..models.app_vcs_connection import AppVCSConnection + from ..models.types_string_bool_map import TypesStringBoolMap + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _features = d.pop("features", UNSET) + features: Union[Unset, TypesStringBoolMap] + if isinstance(_features, Unset): + features = UNSET + else: + features = TypesStringBoolMap.from_dict(_features) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppOrgLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppOrgLinks.from_dict(_links) + + logo_url = d.pop("logo_url", UNSET) + + name = d.pop("name", UNSET) + + _notifications_config = d.pop("notifications_config", UNSET) + notifications_config: Union[Unset, AppNotificationsConfig] + if isinstance(_notifications_config, Unset): + notifications_config = UNSET + else: + notifications_config = AppNotificationsConfig.from_dict(_notifications_config) + + _runner_group = d.pop("runner_group", UNSET) + runner_group: Union[Unset, AppRunnerGroup] + if isinstance(_runner_group, Unset): + runner_group = UNSET + else: + runner_group = AppRunnerGroup.from_dict(_runner_group) + + sandbox_mode = d.pop("sandbox_mode", UNSET) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + vcs_connections = [] + _vcs_connections = d.pop("vcs_connections", UNSET) + for vcs_connections_item_data in _vcs_connections or []: + vcs_connections_item = AppVCSConnection.from_dict(vcs_connections_item_data) + + vcs_connections.append(vcs_connections_item) + + app_org = cls( + created_at=created_at, + created_by_id=created_by_id, + features=features, + id=id, + links=links, + logo_url=logo_url, + name=name, + notifications_config=notifications_config, + runner_group=runner_group, + sandbox_mode=sandbox_mode, + status=status, + status_description=status_description, + updated_at=updated_at, + vcs_connections=vcs_connections, + ) + + app_org.additional_properties = d + return app_org + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_org_invite.py b/nuon/models/app_org_invite.py new file mode 100644 index 00000000..00cb876e --- /dev/null +++ b/nuon/models/app_org_invite.py @@ -0,0 +1,138 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_org_invite_status import AppOrgInviteStatus +from ..models.app_role_type import AppRoleType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppOrgInvite") + + +@_attrs_define +class AppOrgInvite: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + email (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): parent relationship + role_type (Union[Unset, AppRoleType]): + status (Union[Unset, AppOrgInviteStatus]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + role_type: Union[Unset, AppRoleType] = UNSET + status: Union[Unset, AppOrgInviteStatus] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + email = self.email + + id = self.id + + org_id = self.org_id + + role_type: Union[Unset, str] = UNSET + if not isinstance(self.role_type, Unset): + role_type = self.role_type.value + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if email is not UNSET: + field_dict["email"] = email + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if role_type is not UNSET: + field_dict["role_type"] = role_type + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + email = d.pop("email", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + _role_type = d.pop("role_type", UNSET) + role_type: Union[Unset, AppRoleType] + if isinstance(_role_type, Unset): + role_type = UNSET + else: + role_type = AppRoleType(_role_type) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppOrgInviteStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppOrgInviteStatus(_status) + + updated_at = d.pop("updated_at", UNSET) + + app_org_invite = cls( + created_at=created_at, + created_by_id=created_by_id, + email=email, + id=id, + org_id=org_id, + role_type=role_type, + status=status, + updated_at=updated_at, + ) + + app_org_invite.additional_properties = d + return app_org_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/nuon/models/app_org_invite_status.py b/nuon/models/app_org_invite_status.py new file mode 100644 index 00000000..d5f8de3d --- /dev/null +++ b/nuon/models/app_org_invite_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AppOrgInviteStatus(str, Enum): + ACCEPTED = "accepted" + PENDING = "pending" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_org_links.py b/nuon/models/app_org_links.py new file mode 100644 index 00000000..b8c3ddea --- /dev/null +++ b/nuon/models/app_org_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppOrgLinks") + + +@_attrs_define +class AppOrgLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_org_links = cls() + + app_org_links.additional_properties = d + return app_org_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record.py b/nuon/models/app_otel_log_record.py new file mode 100644 index 00000000..12f6ccdf --- /dev/null +++ b/nuon/models/app_otel_log_record.py @@ -0,0 +1,333 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_otel_log_record_log_attributes import AppOtelLogRecordLogAttributes + from ..models.app_otel_log_record_resource_attributes import AppOtelLogRecordResourceAttributes + from ..models.app_otel_log_record_scope_attributes import AppOtelLogRecordScopeAttributes + + +T = TypeVar("T", bound="AppOtelLogRecord") + + +@_attrs_define +class AppOtelLogRecord: + """ + Attributes: + body (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + log_attributes (Union[Unset, AppOtelLogRecordLogAttributes]): + log_stream_id (Union[Unset, str]): + org_id (Union[Unset, str]): internal attributes + resource_attributes (Union[Unset, AppOtelLogRecordResourceAttributes]): + resource_schema_url (Union[Unset, str]): + runner_group_id (Union[Unset, str]): + runner_id (Union[Unset, str]): + runner_job_execution_id (Union[Unset, str]): + runner_job_execution_step (Union[Unset, str]): + runner_job_id (Union[Unset, str]): + scope_attributes (Union[Unset, AppOtelLogRecordScopeAttributes]): + scope_name (Union[Unset, str]): + scope_schema_url (Union[Unset, str]): + scope_version (Union[Unset, str]): + service_name (Union[Unset, str]): + severity_number (Union[Unset, int]): + severity_text (Union[Unset, str]): + span_id (Union[Unset, str]): + timestamp (Union[Unset, str]): OTEL log message attributes + timestamp_date (Union[Unset, str]): + timestamp_time (Union[Unset, str]): + trace_flags (Union[Unset, int]): + trace_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + body: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + log_attributes: Union[Unset, "AppOtelLogRecordLogAttributes"] = UNSET + log_stream_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + resource_attributes: Union[Unset, "AppOtelLogRecordResourceAttributes"] = UNSET + resource_schema_url: Union[Unset, str] = UNSET + runner_group_id: Union[Unset, str] = UNSET + runner_id: Union[Unset, str] = UNSET + runner_job_execution_id: Union[Unset, str] = UNSET + runner_job_execution_step: Union[Unset, str] = UNSET + runner_job_id: Union[Unset, str] = UNSET + scope_attributes: Union[Unset, "AppOtelLogRecordScopeAttributes"] = UNSET + scope_name: Union[Unset, str] = UNSET + scope_schema_url: Union[Unset, str] = UNSET + scope_version: Union[Unset, str] = UNSET + service_name: Union[Unset, str] = UNSET + severity_number: Union[Unset, int] = UNSET + severity_text: Union[Unset, str] = UNSET + span_id: Union[Unset, str] = UNSET + timestamp: Union[Unset, str] = UNSET + timestamp_date: Union[Unset, str] = UNSET + timestamp_time: Union[Unset, str] = UNSET + trace_flags: Union[Unset, int] = UNSET + trace_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + body = self.body + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + log_attributes: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.log_attributes, Unset): + log_attributes = self.log_attributes.to_dict() + + log_stream_id = self.log_stream_id + + org_id = self.org_id + + resource_attributes: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.resource_attributes, Unset): + resource_attributes = self.resource_attributes.to_dict() + + resource_schema_url = self.resource_schema_url + + runner_group_id = self.runner_group_id + + runner_id = self.runner_id + + runner_job_execution_id = self.runner_job_execution_id + + runner_job_execution_step = self.runner_job_execution_step + + runner_job_id = self.runner_job_id + + scope_attributes: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.scope_attributes, Unset): + scope_attributes = self.scope_attributes.to_dict() + + scope_name = self.scope_name + + scope_schema_url = self.scope_schema_url + + scope_version = self.scope_version + + service_name = self.service_name + + severity_number = self.severity_number + + severity_text = self.severity_text + + span_id = self.span_id + + timestamp = self.timestamp + + timestamp_date = self.timestamp_date + + timestamp_time = self.timestamp_time + + trace_flags = self.trace_flags + + trace_id = self.trace_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if body is not UNSET: + field_dict["body"] = body + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if log_attributes is not UNSET: + field_dict["log_attributes"] = log_attributes + if log_stream_id is not UNSET: + field_dict["log_stream_id"] = log_stream_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if resource_attributes is not UNSET: + field_dict["resource_attributes"] = resource_attributes + if resource_schema_url is not UNSET: + field_dict["resource_schema_url"] = resource_schema_url + if runner_group_id is not UNSET: + field_dict["runner_group_id"] = runner_group_id + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if runner_job_execution_id is not UNSET: + field_dict["runner_job_execution_id"] = runner_job_execution_id + if runner_job_execution_step is not UNSET: + field_dict["runner_job_execution_step"] = runner_job_execution_step + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if scope_attributes is not UNSET: + field_dict["scope_attributes"] = scope_attributes + if scope_name is not UNSET: + field_dict["scope_name"] = scope_name + if scope_schema_url is not UNSET: + field_dict["scope_schema_url"] = scope_schema_url + if scope_version is not UNSET: + field_dict["scope_version"] = scope_version + if service_name is not UNSET: + field_dict["service_name"] = service_name + if severity_number is not UNSET: + field_dict["severity_number"] = severity_number + if severity_text is not UNSET: + field_dict["severity_text"] = severity_text + if span_id is not UNSET: + field_dict["span_id"] = span_id + if timestamp is not UNSET: + field_dict["timestamp"] = timestamp + if timestamp_date is not UNSET: + field_dict["timestamp_date"] = timestamp_date + if timestamp_time is not UNSET: + field_dict["timestamp_time"] = timestamp_time + if trace_flags is not UNSET: + field_dict["trace_flags"] = trace_flags + if trace_id is not UNSET: + field_dict["trace_id"] = trace_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_otel_log_record_log_attributes import AppOtelLogRecordLogAttributes + from ..models.app_otel_log_record_resource_attributes import AppOtelLogRecordResourceAttributes + from ..models.app_otel_log_record_scope_attributes import AppOtelLogRecordScopeAttributes + + d = dict(src_dict) + body = d.pop("body", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _log_attributes = d.pop("log_attributes", UNSET) + log_attributes: Union[Unset, AppOtelLogRecordLogAttributes] + if isinstance(_log_attributes, Unset): + log_attributes = UNSET + else: + log_attributes = AppOtelLogRecordLogAttributes.from_dict(_log_attributes) + + log_stream_id = d.pop("log_stream_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + _resource_attributes = d.pop("resource_attributes", UNSET) + resource_attributes: Union[Unset, AppOtelLogRecordResourceAttributes] + if isinstance(_resource_attributes, Unset): + resource_attributes = UNSET + else: + resource_attributes = AppOtelLogRecordResourceAttributes.from_dict(_resource_attributes) + + resource_schema_url = d.pop("resource_schema_url", UNSET) + + runner_group_id = d.pop("runner_group_id", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + runner_job_execution_id = d.pop("runner_job_execution_id", UNSET) + + runner_job_execution_step = d.pop("runner_job_execution_step", UNSET) + + runner_job_id = d.pop("runner_job_id", UNSET) + + _scope_attributes = d.pop("scope_attributes", UNSET) + scope_attributes: Union[Unset, AppOtelLogRecordScopeAttributes] + if isinstance(_scope_attributes, Unset): + scope_attributes = UNSET + else: + scope_attributes = AppOtelLogRecordScopeAttributes.from_dict(_scope_attributes) + + scope_name = d.pop("scope_name", UNSET) + + scope_schema_url = d.pop("scope_schema_url", UNSET) + + scope_version = d.pop("scope_version", UNSET) + + service_name = d.pop("service_name", UNSET) + + severity_number = d.pop("severity_number", UNSET) + + severity_text = d.pop("severity_text", UNSET) + + span_id = d.pop("span_id", UNSET) + + timestamp = d.pop("timestamp", UNSET) + + timestamp_date = d.pop("timestamp_date", UNSET) + + timestamp_time = d.pop("timestamp_time", UNSET) + + trace_flags = d.pop("trace_flags", UNSET) + + trace_id = d.pop("trace_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_otel_log_record = cls( + body=body, + created_at=created_at, + created_by_id=created_by_id, + id=id, + log_attributes=log_attributes, + log_stream_id=log_stream_id, + org_id=org_id, + resource_attributes=resource_attributes, + resource_schema_url=resource_schema_url, + runner_group_id=runner_group_id, + runner_id=runner_id, + runner_job_execution_id=runner_job_execution_id, + runner_job_execution_step=runner_job_execution_step, + runner_job_id=runner_job_id, + scope_attributes=scope_attributes, + scope_name=scope_name, + scope_schema_url=scope_schema_url, + scope_version=scope_version, + service_name=service_name, + severity_number=severity_number, + severity_text=severity_text, + span_id=span_id, + timestamp=timestamp, + timestamp_date=timestamp_date, + timestamp_time=timestamp_time, + trace_flags=trace_flags, + trace_id=trace_id, + updated_at=updated_at, + ) + + app_otel_log_record.additional_properties = d + return app_otel_log_record + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record_log_attributes.py b/nuon/models/app_otel_log_record_log_attributes.py new file mode 100644 index 00000000..a76118b5 --- /dev/null +++ b/nuon/models/app_otel_log_record_log_attributes.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppOtelLogRecordLogAttributes") + + +@_attrs_define +class AppOtelLogRecordLogAttributes: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_otel_log_record_log_attributes = cls() + + app_otel_log_record_log_attributes.additional_properties = d + return app_otel_log_record_log_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record_resource_attributes.py b/nuon/models/app_otel_log_record_resource_attributes.py new file mode 100644 index 00000000..eb1a0d80 --- /dev/null +++ b/nuon/models/app_otel_log_record_resource_attributes.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppOtelLogRecordResourceAttributes") + + +@_attrs_define +class AppOtelLogRecordResourceAttributes: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_otel_log_record_resource_attributes = cls() + + app_otel_log_record_resource_attributes.additional_properties = d + return app_otel_log_record_resource_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_otel_log_record_scope_attributes.py b/nuon/models/app_otel_log_record_scope_attributes.py new file mode 100644 index 00000000..76262ec0 --- /dev/null +++ b/nuon/models/app_otel_log_record_scope_attributes.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppOtelLogRecordScopeAttributes") + + +@_attrs_define +class AppOtelLogRecordScopeAttributes: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_otel_log_record_scope_attributes = cls() + + app_otel_log_record_scope_attributes.additional_properties = d + return app_otel_log_record_scope_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_policy.py b/nuon/models/app_policy.py new file mode 100644 index 00000000..d20c19ca --- /dev/null +++ b/nuon/models/app_policy.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_policy_name import AppPolicyName +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_policy_permissions import AppPolicyPermissions + + +T = TypeVar("T", bound="AppPolicy") + + +@_attrs_define +class AppPolicy: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + name (Union[Unset, AppPolicyName]): + permissions (Union[Unset, AppPolicyPermissions]): Permissions are used to track granular permissions for each + domain + role_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, AppPolicyName] = UNSET + permissions: Union[Unset, "AppPolicyPermissions"] = UNSET + role_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + name: Union[Unset, str] = UNSET + if not isinstance(self.name, Unset): + name = self.name.value + + permissions: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.permissions, Unset): + permissions = self.permissions.to_dict() + + role_id = self.role_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if permissions is not UNSET: + field_dict["permissions"] = permissions + if role_id is not UNSET: + field_dict["role_id"] = role_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_policy_permissions import AppPolicyPermissions + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _name = d.pop("name", UNSET) + name: Union[Unset, AppPolicyName] + if isinstance(_name, Unset): + name = UNSET + else: + name = AppPolicyName(_name) + + _permissions = d.pop("permissions", UNSET) + permissions: Union[Unset, AppPolicyPermissions] + if isinstance(_permissions, Unset): + permissions = UNSET + else: + permissions = AppPolicyPermissions.from_dict(_permissions) + + role_id = d.pop("role_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_policy = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + name=name, + permissions=permissions, + role_id=role_id, + updated_at=updated_at, + ) + + app_policy.additional_properties = d + return app_policy + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_policy_name.py b/nuon/models/app_policy_name.py new file mode 100644 index 00000000..bd8a5d58 --- /dev/null +++ b/nuon/models/app_policy_name.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AppPolicyName(str, Enum): + HOSTED_INSTALLER = "hosted_installer" + INSTALLER = "installer" + ORG_ADMIN = "org_admin" + RUNNER = "runner" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_policy_permissions.py b/nuon/models/app_policy_permissions.py new file mode 100644 index 00000000..b22dfa48 --- /dev/null +++ b/nuon/models/app_policy_permissions.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppPolicyPermissions") + + +@_attrs_define +class AppPolicyPermissions: + """Permissions are used to track granular permissions for each domain""" + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_policy_permissions = cls() + + app_policy_permissions.additional_properties = d + return app_policy_permissions + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_public_git_vcs_config.py b/nuon/models/app_public_git_vcs_config.py new file mode 100644 index 00000000..4b2c1e78 --- /dev/null +++ b/nuon/models/app_public_git_vcs_config.py @@ -0,0 +1,131 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppPublicGitVCSConfig") + + +@_attrs_define +class AppPublicGitVCSConfig: + """ + Attributes: + branch (Union[Unset, str]): + component_config_id (Union[Unset, str]): + component_config_type (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + directory (Union[Unset, str]): + id (Union[Unset, str]): + repo (Union[Unset, str]): actual configuration + updated_at (Union[Unset, str]): + """ + + branch: Union[Unset, str] = UNSET + component_config_id: Union[Unset, str] = UNSET + component_config_type: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + directory: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + repo: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + branch = self.branch + + component_config_id = self.component_config_id + + component_config_type = self.component_config_type + + created_at = self.created_at + + created_by_id = self.created_by_id + + directory = self.directory + + id = self.id + + repo = self.repo + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if branch is not UNSET: + field_dict["branch"] = branch + if component_config_id is not UNSET: + field_dict["component_config_id"] = component_config_id + if component_config_type is not UNSET: + field_dict["component_config_type"] = component_config_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if directory is not UNSET: + field_dict["directory"] = directory + if id is not UNSET: + field_dict["id"] = id + if repo is not UNSET: + field_dict["repo"] = repo + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + branch = d.pop("branch", UNSET) + + component_config_id = d.pop("component_config_id", UNSET) + + component_config_type = d.pop("component_config_type", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + directory = d.pop("directory", UNSET) + + id = d.pop("id", UNSET) + + repo = d.pop("repo", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_public_git_vcs_config = cls( + branch=branch, + component_config_id=component_config_id, + component_config_type=component_config_type, + created_at=created_at, + created_by_id=created_by_id, + directory=directory, + id=id, + repo=repo, + updated_at=updated_at, + ) + + app_public_git_vcs_config.additional_properties = d + return app_public_git_vcs_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_role.py b/nuon/models/app_role.py new file mode 100644 index 00000000..f039d710 --- /dev/null +++ b/nuon/models/app_role.py @@ -0,0 +1,146 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_role_type import AppRoleType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_policy import AppPolicy + + +T = TypeVar("T", bound="AppRole") + + +@_attrs_define +class AppRole: + """ + Attributes: + created_by (Union[Unset, AppAccount]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + policies (Union[Unset, list['AppPolicy']]): + role_type (Union[Unset, AppRoleType]): + updated_at (Union[Unset, str]): + """ + + created_by: Union[Unset, "AppAccount"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + policies: Union[Unset, list["AppPolicy"]] = UNSET + role_type: Union[Unset, AppRoleType] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + policies: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.policies, Unset): + policies = [] + for policies_item_data in self.policies: + policies_item = policies_item_data.to_dict() + policies.append(policies_item) + + role_type: Union[Unset, str] = UNSET + if not isinstance(self.role_type, Unset): + role_type = self.role_type.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if policies is not UNSET: + field_dict["policies"] = policies + if role_type is not UNSET: + field_dict["role_type"] = role_type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_policy import AppPolicy + + d = dict(src_dict) + _created_by = d.pop("createdBy", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + policies = [] + _policies = d.pop("policies", UNSET) + for policies_item_data in _policies or []: + policies_item = AppPolicy.from_dict(policies_item_data) + + policies.append(policies_item) + + _role_type = d.pop("role_type", UNSET) + role_type: Union[Unset, AppRoleType] + if isinstance(_role_type, Unset): + role_type = UNSET + else: + role_type = AppRoleType(_role_type) + + updated_at = d.pop("updated_at", UNSET) + + app_role = cls( + created_by=created_by, + created_at=created_at, + created_by_id=created_by_id, + id=id, + policies=policies, + role_type=role_type, + updated_at=updated_at, + ) + + app_role.additional_properties = d + return app_role + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_role_type.py b/nuon/models/app_role_type.py new file mode 100644 index 00000000..bca4537b --- /dev/null +++ b/nuon/models/app_role_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AppRoleType(str, Enum): + HOSTED_INSTALLER = "hosted-installer" + INSTALLER = "installer" + ORG_ADMIN = "org_admin" + RUNNER = "runner" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner.py b/nuon/models/app_runner.py new file mode 100644 index 00000000..90789613 --- /dev/null +++ b/nuon/models/app_runner.py @@ -0,0 +1,220 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_group import AppRunnerGroup + from ..models.app_runner_job import AppRunnerJob + from ..models.app_runner_operation import AppRunnerOperation + + +T = TypeVar("T", bound="AppRunner") + + +@_attrs_define +class AppRunner: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + display_name (Union[Unset, str]): + id (Union[Unset, str]): + jobs (Union[Unset, list['AppRunnerJob']]): + name (Union[Unset, str]): + operations (Union[Unset, list['AppRunnerOperation']]): + org_id (Union[Unset, str]): + runner_group (Union[Unset, AppRunnerGroup]): + runner_group_id (Union[Unset, str]): + runner_job (Union[Unset, AppRunnerJob]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + jobs: Union[Unset, list["AppRunnerJob"]] = UNSET + name: Union[Unset, str] = UNSET + operations: Union[Unset, list["AppRunnerOperation"]] = UNSET + org_id: Union[Unset, str] = UNSET + runner_group: Union[Unset, "AppRunnerGroup"] = UNSET + runner_group_id: Union[Unset, str] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + display_name = self.display_name + + id = self.id + + jobs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.jobs, Unset): + jobs = [] + for jobs_item_data in self.jobs: + jobs_item = jobs_item_data.to_dict() + jobs.append(jobs_item) + + name = self.name + + operations: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.operations, Unset): + operations = [] + for operations_item_data in self.operations: + operations_item = operations_item_data.to_dict() + operations.append(operations_item) + + org_id = self.org_id + + runner_group: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_group, Unset): + runner_group = self.runner_group.to_dict() + + runner_group_id = self.runner_group_id + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if display_name is not UNSET: + field_dict["display_name"] = display_name + if id is not UNSET: + field_dict["id"] = id + if jobs is not UNSET: + field_dict["jobs"] = jobs + if name is not UNSET: + field_dict["name"] = name + if operations is not UNSET: + field_dict["operations"] = operations + if org_id is not UNSET: + field_dict["org_id"] = org_id + if runner_group is not UNSET: + field_dict["runner_group"] = runner_group + if runner_group_id is not UNSET: + field_dict["runner_group_id"] = runner_group_id + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_group import AppRunnerGroup + from ..models.app_runner_job import AppRunnerJob + from ..models.app_runner_operation import AppRunnerOperation + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + display_name = d.pop("display_name", UNSET) + + id = d.pop("id", UNSET) + + jobs = [] + _jobs = d.pop("jobs", UNSET) + for jobs_item_data in _jobs or []: + jobs_item = AppRunnerJob.from_dict(jobs_item_data) + + jobs.append(jobs_item) + + name = d.pop("name", UNSET) + + operations = [] + _operations = d.pop("operations", UNSET) + for operations_item_data in _operations or []: + operations_item = AppRunnerOperation.from_dict(operations_item_data) + + operations.append(operations_item) + + org_id = d.pop("org_id", UNSET) + + _runner_group = d.pop("runner_group", UNSET) + runner_group: Union[Unset, AppRunnerGroup] + if isinstance(_runner_group, Unset): + runner_group = UNSET + else: + runner_group = AppRunnerGroup.from_dict(_runner_group) + + runner_group_id = d.pop("runner_group_id", UNSET) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_runner = cls( + created_at=created_at, + created_by_id=created_by_id, + display_name=display_name, + id=id, + jobs=jobs, + name=name, + operations=operations, + org_id=org_id, + runner_group=runner_group, + runner_group_id=runner_group_id, + runner_job=runner_job, + status=status, + status_description=status_description, + updated_at=updated_at, + ) + + app_runner.additional_properties = d + return app_runner + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_group.py b/nuon/models/app_runner_group.py new file mode 100644 index 00000000..fa3e13fa --- /dev/null +++ b/nuon/models/app_runner_group.py @@ -0,0 +1,190 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_app_runner_type import AppAppRunnerType +from ..models.app_runner_group_type import AppRunnerGroupType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner import AppRunner + from ..models.app_runner_group_settings import AppRunnerGroupSettings + + +T = TypeVar("T", bound="AppRunnerGroup") + + +@_attrs_define +class AppRunnerGroup: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + owner_id (Union[Unset, str]): parent can org, install or in the future, builtin runner group + owner_type (Union[Unset, str]): + platform (Union[Unset, AppAppRunnerType]): + runners (Union[Unset, list['AppRunner']]): + settings (Union[Unset, AppRunnerGroupSettings]): + type_ (Union[Unset, AppRunnerGroupType]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + platform: Union[Unset, AppAppRunnerType] = UNSET + runners: Union[Unset, list["AppRunner"]] = UNSET + settings: Union[Unset, "AppRunnerGroupSettings"] = UNSET + type_: Union[Unset, AppRunnerGroupType] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + platform: Union[Unset, str] = UNSET + if not isinstance(self.platform, Unset): + platform = self.platform.value + + runners: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.runners, Unset): + runners = [] + for runners_item_data in self.runners: + runners_item = runners_item_data.to_dict() + runners.append(runners_item) + + settings: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.settings, Unset): + settings = self.settings.to_dict() + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if platform is not UNSET: + field_dict["platform"] = platform + if runners is not UNSET: + field_dict["runners"] = runners + if settings is not UNSET: + field_dict["settings"] = settings + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner import AppRunner + from ..models.app_runner_group_settings import AppRunnerGroupSettings + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + _platform = d.pop("platform", UNSET) + platform: Union[Unset, AppAppRunnerType] + if isinstance(_platform, Unset): + platform = UNSET + else: + platform = AppAppRunnerType(_platform) + + runners = [] + _runners = d.pop("runners", UNSET) + for runners_item_data in _runners or []: + runners_item = AppRunner.from_dict(runners_item_data) + + runners.append(runners_item) + + _settings = d.pop("settings", UNSET) + settings: Union[Unset, AppRunnerGroupSettings] + if isinstance(_settings, Unset): + settings = UNSET + else: + settings = AppRunnerGroupSettings.from_dict(_settings) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppRunnerGroupType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppRunnerGroupType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_group = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + owner_id=owner_id, + owner_type=owner_type, + platform=platform, + runners=runners, + settings=settings, + type_=type_, + updated_at=updated_at, + ) + + app_runner_group.additional_properties = d + return app_runner_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/nuon/models/app_runner_group_settings.py b/nuon/models/app_runner_group_settings.py new file mode 100644 index 00000000..ea032b7e --- /dev/null +++ b/nuon/models/app_runner_group_settings.py @@ -0,0 +1,309 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_group_settings_aws_tags import AppRunnerGroupSettingsAwsTags + from ..models.app_runner_group_settings_metadata import AppRunnerGroupSettingsMetadata + + +T = TypeVar("T", bound="AppRunnerGroupSettings") + + +@_attrs_define +class AppRunnerGroupSettings: + """ + Attributes: + aws_cloudformation_stack_type (Union[Unset, str]): + aws_instance_type (Union[Unset, str]): aws runner specifics runner-v2 + aws_max_instance_lifetime (Union[Unset, int]): Default: 7 days + aws_tags (Union[Unset, AppRunnerGroupSettingsAwsTags]): + container_image_tag (Union[Unset, str]): + container_image_url (Union[Unset, str]): configuration for deploying the runner + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + enable_logging (Union[Unset, bool]): + enable_metrics (Union[Unset, bool]): + enable_sentry (Union[Unset, bool]): + groups (Union[Unset, list[str]]): the job loop groups the runner should poll for + heart_beat_timeout (Union[Unset, int]): Various settings for the runner to handle internally + id (Union[Unset, str]): + local_aws_iam_role_arn (Union[Unset, str]): + logging_level (Union[Unset, str]): + metadata (Union[Unset, AppRunnerGroupSettingsMetadata]): Metadata is used as both log and metric tags/attributes + in the runner when emitting data + org_aws_iam_role_arn (Union[Unset, str]): org runner specifics + org_id (Union[Unset, str]): + org_k8s_service_account_name (Union[Unset, str]): + otel_collector_config (Union[Unset, str]): + platform (Union[Unset, str]): platform variable for use in the runner + runner_api_url (Union[Unset, str]): + runner_group_id (Union[Unset, str]): + sandbox_mode (Union[Unset, bool]): configuration for managing the runner server side + updated_at (Union[Unset, str]): + """ + + aws_cloudformation_stack_type: Union[Unset, str] = UNSET + aws_instance_type: Union[Unset, str] = UNSET + aws_max_instance_lifetime: Union[Unset, int] = UNSET + aws_tags: Union[Unset, "AppRunnerGroupSettingsAwsTags"] = UNSET + container_image_tag: Union[Unset, str] = UNSET + container_image_url: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + enable_logging: Union[Unset, bool] = UNSET + enable_metrics: Union[Unset, bool] = UNSET + enable_sentry: Union[Unset, bool] = UNSET + groups: Union[Unset, list[str]] = UNSET + heart_beat_timeout: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + local_aws_iam_role_arn: Union[Unset, str] = UNSET + logging_level: Union[Unset, str] = UNSET + metadata: Union[Unset, "AppRunnerGroupSettingsMetadata"] = UNSET + org_aws_iam_role_arn: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + org_k8s_service_account_name: Union[Unset, str] = UNSET + otel_collector_config: Union[Unset, str] = UNSET + platform: Union[Unset, str] = UNSET + runner_api_url: Union[Unset, str] = UNSET + runner_group_id: Union[Unset, str] = UNSET + sandbox_mode: Union[Unset, bool] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_cloudformation_stack_type = self.aws_cloudformation_stack_type + + aws_instance_type = self.aws_instance_type + + aws_max_instance_lifetime = self.aws_max_instance_lifetime + + aws_tags: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_tags, Unset): + aws_tags = self.aws_tags.to_dict() + + container_image_tag = self.container_image_tag + + container_image_url = self.container_image_url + + created_at = self.created_at + + created_by_id = self.created_by_id + + enable_logging = self.enable_logging + + enable_metrics = self.enable_metrics + + enable_sentry = self.enable_sentry + + groups: Union[Unset, list[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + heart_beat_timeout = self.heart_beat_timeout + + id = self.id + + local_aws_iam_role_arn = self.local_aws_iam_role_arn + + logging_level = self.logging_level + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + org_aws_iam_role_arn = self.org_aws_iam_role_arn + + org_id = self.org_id + + org_k8s_service_account_name = self.org_k8s_service_account_name + + otel_collector_config = self.otel_collector_config + + platform = self.platform + + runner_api_url = self.runner_api_url + + runner_group_id = self.runner_group_id + + sandbox_mode = self.sandbox_mode + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_cloudformation_stack_type is not UNSET: + field_dict["aws_cloudformation_stack_type"] = aws_cloudformation_stack_type + if aws_instance_type is not UNSET: + field_dict["aws_instance_type"] = aws_instance_type + if aws_max_instance_lifetime is not UNSET: + field_dict["aws_max_instance_lifetime"] = aws_max_instance_lifetime + if aws_tags is not UNSET: + field_dict["aws_tags"] = aws_tags + if container_image_tag is not UNSET: + field_dict["container_image_tag"] = container_image_tag + if container_image_url is not UNSET: + field_dict["container_image_url"] = container_image_url + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if enable_logging is not UNSET: + field_dict["enable_logging"] = enable_logging + if enable_metrics is not UNSET: + field_dict["enable_metrics"] = enable_metrics + if enable_sentry is not UNSET: + field_dict["enable_sentry"] = enable_sentry + if groups is not UNSET: + field_dict["groups"] = groups + if heart_beat_timeout is not UNSET: + field_dict["heart_beat_timeout"] = heart_beat_timeout + if id is not UNSET: + field_dict["id"] = id + if local_aws_iam_role_arn is not UNSET: + field_dict["local_aws_iam_role_arn"] = local_aws_iam_role_arn + if logging_level is not UNSET: + field_dict["logging_level"] = logging_level + if metadata is not UNSET: + field_dict["metadata"] = metadata + if org_aws_iam_role_arn is not UNSET: + field_dict["org_aws_iam_role_arn"] = org_aws_iam_role_arn + if org_id is not UNSET: + field_dict["org_id"] = org_id + if org_k8s_service_account_name is not UNSET: + field_dict["org_k8s_service_account_name"] = org_k8s_service_account_name + if otel_collector_config is not UNSET: + field_dict["otel_collector_config"] = otel_collector_config + if platform is not UNSET: + field_dict["platform"] = platform + if runner_api_url is not UNSET: + field_dict["runner_api_url"] = runner_api_url + if runner_group_id is not UNSET: + field_dict["runner_group_id"] = runner_group_id + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_group_settings_aws_tags import AppRunnerGroupSettingsAwsTags + from ..models.app_runner_group_settings_metadata import AppRunnerGroupSettingsMetadata + + d = dict(src_dict) + aws_cloudformation_stack_type = d.pop("aws_cloudformation_stack_type", UNSET) + + aws_instance_type = d.pop("aws_instance_type", UNSET) + + aws_max_instance_lifetime = d.pop("aws_max_instance_lifetime", UNSET) + + _aws_tags = d.pop("aws_tags", UNSET) + aws_tags: Union[Unset, AppRunnerGroupSettingsAwsTags] + if isinstance(_aws_tags, Unset): + aws_tags = UNSET + else: + aws_tags = AppRunnerGroupSettingsAwsTags.from_dict(_aws_tags) + + container_image_tag = d.pop("container_image_tag", UNSET) + + container_image_url = d.pop("container_image_url", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + enable_logging = d.pop("enable_logging", UNSET) + + enable_metrics = d.pop("enable_metrics", UNSET) + + enable_sentry = d.pop("enable_sentry", UNSET) + + groups = cast(list[str], d.pop("groups", UNSET)) + + heart_beat_timeout = d.pop("heart_beat_timeout", UNSET) + + id = d.pop("id", UNSET) + + local_aws_iam_role_arn = d.pop("local_aws_iam_role_arn", UNSET) + + logging_level = d.pop("logging_level", UNSET) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppRunnerGroupSettingsMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppRunnerGroupSettingsMetadata.from_dict(_metadata) + + org_aws_iam_role_arn = d.pop("org_aws_iam_role_arn", UNSET) + + org_id = d.pop("org_id", UNSET) + + org_k8s_service_account_name = d.pop("org_k8s_service_account_name", UNSET) + + otel_collector_config = d.pop("otel_collector_config", UNSET) + + platform = d.pop("platform", UNSET) + + runner_api_url = d.pop("runner_api_url", UNSET) + + runner_group_id = d.pop("runner_group_id", UNSET) + + sandbox_mode = d.pop("sandbox_mode", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_group_settings = cls( + aws_cloudformation_stack_type=aws_cloudformation_stack_type, + aws_instance_type=aws_instance_type, + aws_max_instance_lifetime=aws_max_instance_lifetime, + aws_tags=aws_tags, + container_image_tag=container_image_tag, + container_image_url=container_image_url, + created_at=created_at, + created_by_id=created_by_id, + enable_logging=enable_logging, + enable_metrics=enable_metrics, + enable_sentry=enable_sentry, + groups=groups, + heart_beat_timeout=heart_beat_timeout, + id=id, + local_aws_iam_role_arn=local_aws_iam_role_arn, + logging_level=logging_level, + metadata=metadata, + org_aws_iam_role_arn=org_aws_iam_role_arn, + org_id=org_id, + org_k8s_service_account_name=org_k8s_service_account_name, + otel_collector_config=otel_collector_config, + platform=platform, + runner_api_url=runner_api_url, + runner_group_id=runner_group_id, + sandbox_mode=sandbox_mode, + updated_at=updated_at, + ) + + app_runner_group_settings.additional_properties = d + return app_runner_group_settings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_group_settings_aws_tags.py b/nuon/models/app_runner_group_settings_aws_tags.py new file mode 100644 index 00000000..29661cab --- /dev/null +++ b/nuon/models/app_runner_group_settings_aws_tags.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppRunnerGroupSettingsAwsTags") + + +@_attrs_define +class AppRunnerGroupSettingsAwsTags: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_runner_group_settings_aws_tags = cls() + + app_runner_group_settings_aws_tags.additional_properties = d + return app_runner_group_settings_aws_tags + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_group_settings_metadata.py b/nuon/models/app_runner_group_settings_metadata.py new file mode 100644 index 00000000..2ac06262 --- /dev/null +++ b/nuon/models/app_runner_group_settings_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppRunnerGroupSettingsMetadata") + + +@_attrs_define +class AppRunnerGroupSettingsMetadata: + """Metadata is used as both log and metric tags/attributes in the runner when emitting data""" + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_runner_group_settings_metadata = cls() + + app_runner_group_settings_metadata.additional_properties = d + return app_runner_group_settings_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_group_type.py b/nuon/models/app_runner_group_type.py new file mode 100644 index 00000000..c0878d84 --- /dev/null +++ b/nuon/models/app_runner_group_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AppRunnerGroupType(str, Enum): + INSTALL = "install" + ORG = "org" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_health_check.py b/nuon/models/app_runner_health_check.py new file mode 100644 index 00000000..3746f58b --- /dev/null +++ b/nuon/models/app_runner_health_check.py @@ -0,0 +1,161 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_runner_status import AppRunnerStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job import AppRunnerJob + + +T = TypeVar("T", bound="AppRunnerHealthCheck") + + +@_attrs_define +class AppRunnerHealthCheck: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + minute_bucket (Union[Unset, str]): + process (Union[Unset, str]): + runner_id (Union[Unset, str]): + runner_job (Union[Unset, AppRunnerJob]): + status (Union[Unset, AppRunnerStatus]): + status_code (Union[Unset, int]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + minute_bucket: Union[Unset, str] = UNSET + process: Union[Unset, str] = UNSET + runner_id: Union[Unset, str] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + status: Union[Unset, AppRunnerStatus] = UNSET + status_code: Union[Unset, int] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + minute_bucket = self.minute_bucket + + process = self.process + + runner_id = self.runner_id + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_code = self.status_code + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if minute_bucket is not UNSET: + field_dict["minute_bucket"] = minute_bucket + if process is not UNSET: + field_dict["process"] = process + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if status is not UNSET: + field_dict["status"] = status + if status_code is not UNSET: + field_dict["status_code"] = status_code + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job import AppRunnerJob + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + minute_bucket = d.pop("minute_bucket", UNSET) + + process = d.pop("process", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppRunnerStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppRunnerStatus(_status) + + status_code = d.pop("status_code", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_health_check = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + minute_bucket=minute_bucket, + process=process, + runner_id=runner_id, + runner_job=runner_job, + status=status, + status_code=status_code, + updated_at=updated_at, + ) + + app_runner_health_check.additional_properties = d + return app_runner_health_check + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_heart_beat.py b/nuon/models/app_runner_heart_beat.py new file mode 100644 index 00000000..6be7b4cc --- /dev/null +++ b/nuon/models/app_runner_heart_beat.py @@ -0,0 +1,131 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppRunnerHeartBeat") + + +@_attrs_define +class AppRunnerHeartBeat: + """ + Attributes: + alive_time (Union[Unset, int]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + process (Union[Unset, str]): + runner_id (Union[Unset, str]): + started_at (Union[Unset, str]): + updated_at (Union[Unset, str]): + version (Union[Unset, str]): + """ + + alive_time: Union[Unset, int] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + process: Union[Unset, str] = UNSET + runner_id: Union[Unset, str] = UNSET + started_at: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + alive_time = self.alive_time + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + process = self.process + + runner_id = self.runner_id + + started_at = self.started_at + + updated_at = self.updated_at + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if alive_time is not UNSET: + field_dict["alive_time"] = alive_time + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if process is not UNSET: + field_dict["process"] = process + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if started_at is not UNSET: + field_dict["started_at"] = started_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + alive_time = d.pop("alive_time", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + process = d.pop("process", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + started_at = d.pop("started_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + version = d.pop("version", UNSET) + + app_runner_heart_beat = cls( + alive_time=alive_time, + created_at=created_at, + created_by_id=created_by_id, + id=id, + process=process, + runner_id=runner_id, + started_at=started_at, + updated_at=updated_at, + version=version, + ) + + app_runner_heart_beat.additional_properties = d + return app_runner_heart_beat + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job.py b/nuon/models/app_runner_job.py new file mode 100644 index 00000000..6509aa58 --- /dev/null +++ b/nuon/models/app_runner_job.py @@ -0,0 +1,370 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_runner_job_group import AppRunnerJobGroup +from ..models.app_runner_job_operation_type import AppRunnerJobOperationType +from ..models.app_runner_job_status import AppRunnerJobStatus +from ..models.app_runner_job_type import AppRunnerJobType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job_execution import AppRunnerJobExecution + from ..models.app_runner_job_metadata import AppRunnerJobMetadata + from ..models.app_runner_job_outputs import AppRunnerJobOutputs + + +T = TypeVar("T", bound="AppRunnerJob") + + +@_attrs_define +class AppRunnerJob: + """ + Attributes: + available_timeout (Union[Unset, int]): available timeout is how long a job can be marked as "available" before + being requeued + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + execution_count (Union[Unset, int]): + execution_time (Union[Unset, int]): + execution_timeout (Union[Unset, int]): execution timeout is how long a job can be marked as "exeucuting" before + being requeued + executions (Union[Unset, list['AppRunnerJobExecution']]): + final_runner_job_execution_id (Union[Unset, str]): + finished_at (Union[Unset, str]): + group (Union[Unset, AppRunnerJobGroup]): + id (Union[Unset, str]): + log_stream_id (Union[Unset, str]): + max_executions (Union[Unset, int]): + metadata (Union[Unset, AppRunnerJobMetadata]): + operation (Union[Unset, AppRunnerJobOperationType]): + org_id (Union[Unset, str]): + outputs (Union[Unset, AppRunnerJobOutputs]): + outputs_json (Union[Unset, str]): + overall_timeout (Union[Unset, int]): overall timeout is how long a job can be attempted, before being cancelled + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + queue_timeout (Union[Unset, int]): queue timeout is how long a job can be queued, before being made available + runner_id (Union[Unset, str]): + started_at (Union[Unset, str]): + status (Union[Unset, AppRunnerJobStatus]): + status_description (Union[Unset, str]): + type_ (Union[Unset, AppRunnerJobType]): + updated_at (Union[Unset, str]): + """ + + available_timeout: Union[Unset, int] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + execution_count: Union[Unset, int] = UNSET + execution_time: Union[Unset, int] = UNSET + execution_timeout: Union[Unset, int] = UNSET + executions: Union[Unset, list["AppRunnerJobExecution"]] = UNSET + final_runner_job_execution_id: Union[Unset, str] = UNSET + finished_at: Union[Unset, str] = UNSET + group: Union[Unset, AppRunnerJobGroup] = UNSET + id: Union[Unset, str] = UNSET + log_stream_id: Union[Unset, str] = UNSET + max_executions: Union[Unset, int] = UNSET + metadata: Union[Unset, "AppRunnerJobMetadata"] = UNSET + operation: Union[Unset, AppRunnerJobOperationType] = UNSET + org_id: Union[Unset, str] = UNSET + outputs: Union[Unset, "AppRunnerJobOutputs"] = UNSET + outputs_json: Union[Unset, str] = UNSET + overall_timeout: Union[Unset, int] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + queue_timeout: Union[Unset, int] = UNSET + runner_id: Union[Unset, str] = UNSET + started_at: Union[Unset, str] = UNSET + status: Union[Unset, AppRunnerJobStatus] = UNSET + status_description: Union[Unset, str] = UNSET + type_: Union[Unset, AppRunnerJobType] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + available_timeout = self.available_timeout + + created_at = self.created_at + + created_by_id = self.created_by_id + + execution_count = self.execution_count + + execution_time = self.execution_time + + execution_timeout = self.execution_timeout + + executions: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.executions, Unset): + executions = [] + for executions_item_data in self.executions: + executions_item = executions_item_data.to_dict() + executions.append(executions_item) + + final_runner_job_execution_id = self.final_runner_job_execution_id + + finished_at = self.finished_at + + group: Union[Unset, str] = UNSET + if not isinstance(self.group, Unset): + group = self.group.value + + id = self.id + + log_stream_id = self.log_stream_id + + max_executions = self.max_executions + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + operation: Union[Unset, str] = UNSET + if not isinstance(self.operation, Unset): + operation = self.operation.value + + org_id = self.org_id + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + outputs_json = self.outputs_json + + overall_timeout = self.overall_timeout + + owner_id = self.owner_id + + owner_type = self.owner_type + + queue_timeout = self.queue_timeout + + runner_id = self.runner_id + + started_at = self.started_at + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_description = self.status_description + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if available_timeout is not UNSET: + field_dict["available_timeout"] = available_timeout + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if execution_count is not UNSET: + field_dict["execution_count"] = execution_count + if execution_time is not UNSET: + field_dict["execution_time"] = execution_time + if execution_timeout is not UNSET: + field_dict["execution_timeout"] = execution_timeout + if executions is not UNSET: + field_dict["executions"] = executions + if final_runner_job_execution_id is not UNSET: + field_dict["final_runner_job_execution_id"] = final_runner_job_execution_id + if finished_at is not UNSET: + field_dict["finished_at"] = finished_at + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if log_stream_id is not UNSET: + field_dict["log_stream_id"] = log_stream_id + if max_executions is not UNSET: + field_dict["max_executions"] = max_executions + if metadata is not UNSET: + field_dict["metadata"] = metadata + if operation is not UNSET: + field_dict["operation"] = operation + if org_id is not UNSET: + field_dict["org_id"] = org_id + if outputs is not UNSET: + field_dict["outputs"] = outputs + if outputs_json is not UNSET: + field_dict["outputs_json"] = outputs_json + if overall_timeout is not UNSET: + field_dict["overall_timeout"] = overall_timeout + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if queue_timeout is not UNSET: + field_dict["queue_timeout"] = queue_timeout + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job_execution import AppRunnerJobExecution + from ..models.app_runner_job_metadata import AppRunnerJobMetadata + from ..models.app_runner_job_outputs import AppRunnerJobOutputs + + d = dict(src_dict) + available_timeout = d.pop("available_timeout", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + execution_count = d.pop("execution_count", UNSET) + + execution_time = d.pop("execution_time", UNSET) + + execution_timeout = d.pop("execution_timeout", UNSET) + + executions = [] + _executions = d.pop("executions", UNSET) + for executions_item_data in _executions or []: + executions_item = AppRunnerJobExecution.from_dict(executions_item_data) + + executions.append(executions_item) + + final_runner_job_execution_id = d.pop("final_runner_job_execution_id", UNSET) + + finished_at = d.pop("finished_at", UNSET) + + _group = d.pop("group", UNSET) + group: Union[Unset, AppRunnerJobGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = AppRunnerJobGroup(_group) + + id = d.pop("id", UNSET) + + log_stream_id = d.pop("log_stream_id", UNSET) + + max_executions = d.pop("max_executions", UNSET) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppRunnerJobMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppRunnerJobMetadata.from_dict(_metadata) + + _operation = d.pop("operation", UNSET) + operation: Union[Unset, AppRunnerJobOperationType] + if isinstance(_operation, Unset): + operation = UNSET + else: + operation = AppRunnerJobOperationType(_operation) + + org_id = d.pop("org_id", UNSET) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, AppRunnerJobOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = AppRunnerJobOutputs.from_dict(_outputs) + + outputs_json = d.pop("outputs_json", UNSET) + + overall_timeout = d.pop("overall_timeout", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + queue_timeout = d.pop("queue_timeout", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + started_at = d.pop("started_at", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppRunnerJobStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppRunnerJobStatus(_status) + + status_description = d.pop("status_description", UNSET) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppRunnerJobType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppRunnerJobType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_job = cls( + available_timeout=available_timeout, + created_at=created_at, + created_by_id=created_by_id, + execution_count=execution_count, + execution_time=execution_time, + execution_timeout=execution_timeout, + executions=executions, + final_runner_job_execution_id=final_runner_job_execution_id, + finished_at=finished_at, + group=group, + id=id, + log_stream_id=log_stream_id, + max_executions=max_executions, + metadata=metadata, + operation=operation, + org_id=org_id, + outputs=outputs, + outputs_json=outputs_json, + overall_timeout=overall_timeout, + owner_id=owner_id, + owner_type=owner_type, + queue_timeout=queue_timeout, + runner_id=runner_id, + started_at=started_at, + status=status, + status_description=status_description, + type_=type_, + updated_at=updated_at, + ) + + app_runner_job.additional_properties = d + return app_runner_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/nuon/models/app_runner_job_execution.py b/nuon/models/app_runner_job_execution.py new file mode 100644 index 00000000..508d6585 --- /dev/null +++ b/nuon/models/app_runner_job_execution.py @@ -0,0 +1,161 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_runner_job_execution_status import AppRunnerJobExecutionStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job_execution_outputs import AppRunnerJobExecutionOutputs + from ..models.app_runner_job_execution_result import AppRunnerJobExecutionResult + + +T = TypeVar("T", bound="AppRunnerJobExecution") + + +@_attrs_define +class AppRunnerJobExecution: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + outputs (Union[Unset, AppRunnerJobExecutionOutputs]): + result (Union[Unset, AppRunnerJobExecutionResult]): + runner_job_id (Union[Unset, str]): + status (Union[Unset, AppRunnerJobExecutionStatus]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + outputs: Union[Unset, "AppRunnerJobExecutionOutputs"] = UNSET + result: Union[Unset, "AppRunnerJobExecutionResult"] = UNSET + runner_job_id: Union[Unset, str] = UNSET + status: Union[Unset, AppRunnerJobExecutionStatus] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + result: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + runner_job_id = self.runner_job_id + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if outputs is not UNSET: + field_dict["outputs"] = outputs + if result is not UNSET: + field_dict["result"] = result + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job_execution_outputs import AppRunnerJobExecutionOutputs + from ..models.app_runner_job_execution_result import AppRunnerJobExecutionResult + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, AppRunnerJobExecutionOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = AppRunnerJobExecutionOutputs.from_dict(_outputs) + + _result = d.pop("result", UNSET) + result: Union[Unset, AppRunnerJobExecutionResult] + if isinstance(_result, Unset): + result = UNSET + else: + result = AppRunnerJobExecutionResult.from_dict(_result) + + runner_job_id = d.pop("runner_job_id", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppRunnerJobExecutionStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppRunnerJobExecutionStatus(_status) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_job_execution = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + outputs=outputs, + result=result, + runner_job_id=runner_job_id, + status=status, + updated_at=updated_at, + ) + + app_runner_job_execution.additional_properties = d + return app_runner_job_execution + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_outputs.py b/nuon/models/app_runner_job_execution_outputs.py new file mode 100644 index 00000000..00c1c69b --- /dev/null +++ b/nuon/models/app_runner_job_execution_outputs.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job_execution_outputs_outputs import AppRunnerJobExecutionOutputsOutputs + + +T = TypeVar("T", bound="AppRunnerJobExecutionOutputs") + + +@_attrs_define +class AppRunnerJobExecutionOutputs: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + outputs (Union[Unset, AppRunnerJobExecutionOutputsOutputs]): + outputs_json (Union[Unset, str]): + runner_job_execution_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + outputs: Union[Unset, "AppRunnerJobExecutionOutputsOutputs"] = UNSET + outputs_json: Union[Unset, str] = UNSET + runner_job_execution_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + outputs_json = self.outputs_json + + runner_job_execution_id = self.runner_job_execution_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if outputs is not UNSET: + field_dict["outputs"] = outputs + if outputs_json is not UNSET: + field_dict["outputs_json"] = outputs_json + if runner_job_execution_id is not UNSET: + field_dict["runner_job_execution_id"] = runner_job_execution_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job_execution_outputs_outputs import AppRunnerJobExecutionOutputsOutputs + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, AppRunnerJobExecutionOutputsOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = AppRunnerJobExecutionOutputsOutputs.from_dict(_outputs) + + outputs_json = d.pop("outputs_json", UNSET) + + runner_job_execution_id = d.pop("runner_job_execution_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_job_execution_outputs = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + outputs=outputs, + outputs_json=outputs_json, + runner_job_execution_id=runner_job_execution_id, + updated_at=updated_at, + ) + + app_runner_job_execution_outputs.additional_properties = d + return app_runner_job_execution_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_outputs_outputs.py b/nuon/models/app_runner_job_execution_outputs_outputs.py new file mode 100644 index 00000000..bbbd229f --- /dev/null +++ b/nuon/models/app_runner_job_execution_outputs_outputs.py @@ -0,0 +1,63 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.app_runner_job_execution_outputs_outputs_additional_property import ( + AppRunnerJobExecutionOutputsOutputsAdditionalProperty, + ) + + +T = TypeVar("T", bound="AppRunnerJobExecutionOutputsOutputs") + + +@_attrs_define +class AppRunnerJobExecutionOutputsOutputs: + """ """ + + additional_properties: dict[str, "AppRunnerJobExecutionOutputsOutputsAdditionalProperty"] = _attrs_field( + 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(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job_execution_outputs_outputs_additional_property import ( + AppRunnerJobExecutionOutputsOutputsAdditionalProperty, + ) + + d = dict(src_dict) + app_runner_job_execution_outputs_outputs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = AppRunnerJobExecutionOutputsOutputsAdditionalProperty.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + app_runner_job_execution_outputs_outputs.additional_properties = additional_properties + return app_runner_job_execution_outputs_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "AppRunnerJobExecutionOutputsOutputsAdditionalProperty": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "AppRunnerJobExecutionOutputsOutputsAdditionalProperty") -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py b/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py new file mode 100644 index 00000000..908a5ba5 --- /dev/null +++ b/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppRunnerJobExecutionOutputsOutputsAdditionalProperty") + + +@_attrs_define +class AppRunnerJobExecutionOutputsOutputsAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_runner_job_execution_outputs_outputs_additional_property = cls() + + app_runner_job_execution_outputs_outputs_additional_property.additional_properties = d + return app_runner_job_execution_outputs_outputs_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_result.py b/nuon/models/app_runner_job_execution_result.py new file mode 100644 index 00000000..2ebe695b --- /dev/null +++ b/nuon/models/app_runner_job_execution_result.py @@ -0,0 +1,180 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata + + +T = TypeVar("T", bound="AppRunnerJobExecutionResult") + + +@_attrs_define +class AppRunnerJobExecutionResult: + """ + Attributes: + contents (Union[Unset, str]): + contents_display (Union[Unset, str]): + contents_display_gzip (Union[Unset, str]): + contents_gzip (Union[Unset, str]): columns for storage of gzipped contents and plans + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + error_code (Union[Unset, int]): + error_metadata (Union[Unset, AppRunnerJobExecutionResultErrorMetadata]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + runner_job_execution_id (Union[Unset, str]): + success (Union[Unset, bool]): + updated_at (Union[Unset, str]): + """ + + contents: Union[Unset, str] = UNSET + contents_display: Union[Unset, str] = UNSET + contents_display_gzip: Union[Unset, str] = UNSET + contents_gzip: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + error_code: Union[Unset, int] = UNSET + error_metadata: Union[Unset, "AppRunnerJobExecutionResultErrorMetadata"] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + runner_job_execution_id: Union[Unset, str] = UNSET + success: Union[Unset, bool] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + contents = self.contents + + contents_display = self.contents_display + + contents_display_gzip = self.contents_display_gzip + + contents_gzip = self.contents_gzip + + created_at = self.created_at + + created_by_id = self.created_by_id + + error_code = self.error_code + + error_metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.error_metadata, Unset): + error_metadata = self.error_metadata.to_dict() + + id = self.id + + org_id = self.org_id + + runner_job_execution_id = self.runner_job_execution_id + + success = self.success + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if contents_display is not UNSET: + field_dict["contents_display"] = contents_display + if contents_display_gzip is not UNSET: + field_dict["contents_display_gzip"] = contents_display_gzip + if contents_gzip is not UNSET: + field_dict["contents_gzip"] = contents_gzip + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if error_code is not UNSET: + field_dict["error_code"] = error_code + if error_metadata is not UNSET: + field_dict["error_metadata"] = error_metadata + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if runner_job_execution_id is not UNSET: + field_dict["runner_job_execution_id"] = runner_job_execution_id + if success is not UNSET: + field_dict["success"] = success + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata + + d = dict(src_dict) + contents = d.pop("contents", UNSET) + + contents_display = d.pop("contents_display", UNSET) + + contents_display_gzip = d.pop("contents_display_gzip", UNSET) + + contents_gzip = d.pop("contents_gzip", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + error_code = d.pop("error_code", UNSET) + + _error_metadata = d.pop("error_metadata", UNSET) + error_metadata: Union[Unset, AppRunnerJobExecutionResultErrorMetadata] + if isinstance(_error_metadata, Unset): + error_metadata = UNSET + else: + error_metadata = AppRunnerJobExecutionResultErrorMetadata.from_dict(_error_metadata) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + runner_job_execution_id = d.pop("runner_job_execution_id", UNSET) + + success = d.pop("success", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_job_execution_result = cls( + contents=contents, + contents_display=contents_display, + contents_display_gzip=contents_display_gzip, + contents_gzip=contents_gzip, + created_at=created_at, + created_by_id=created_by_id, + error_code=error_code, + error_metadata=error_metadata, + id=id, + org_id=org_id, + runner_job_execution_id=runner_job_execution_id, + success=success, + updated_at=updated_at, + ) + + app_runner_job_execution_result.additional_properties = d + return app_runner_job_execution_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/nuon/models/app_runner_job_execution_result_error_metadata.py b/nuon/models/app_runner_job_execution_result_error_metadata.py new file mode 100644 index 00000000..1c5efc8c --- /dev/null +++ b/nuon/models/app_runner_job_execution_result_error_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppRunnerJobExecutionResultErrorMetadata") + + +@_attrs_define +class AppRunnerJobExecutionResultErrorMetadata: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_runner_job_execution_result_error_metadata = cls() + + app_runner_job_execution_result_error_metadata.additional_properties = d + return app_runner_job_execution_result_error_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_execution_status.py b/nuon/models/app_runner_job_execution_status.py new file mode 100644 index 00000000..8b6e7bb4 --- /dev/null +++ b/nuon/models/app_runner_job_execution_status.py @@ -0,0 +1,17 @@ +from enum import Enum + + +class AppRunnerJobExecutionStatus(str, Enum): + CANCELLED = "cancelled" + CLEANING_UP = "cleaning-up" + FAILED = "failed" + FINISHED = "finished" + INITIALIZING = "initializing" + IN_PROGRESS = "in-progress" + NOT_ATTEMPTED = "not-attempted" + PENDING = "pending" + TIMED_OUT = "timed-out" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_job_group.py b/nuon/models/app_runner_job_group.py new file mode 100644 index 00000000..5e645359 --- /dev/null +++ b/nuon/models/app_runner_job_group.py @@ -0,0 +1,18 @@ +from enum import Enum + + +class AppRunnerJobGroup(str, Enum): + ACTIONS = "actions" + ANY = "any" + BUILD = "build" + DEPLOY = "deploy" + HEALTH_CHECKS = "health-checks" + MANAGEMENT = "management" + OPERATIONS = "operations" + RUNNER = "runner" + SANDBOX = "sandbox" + SYNC = "sync" + VALUE_9 = "" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_job_metadata.py b/nuon/models/app_runner_job_metadata.py new file mode 100644 index 00000000..af0e61b4 --- /dev/null +++ b/nuon/models/app_runner_job_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppRunnerJobMetadata") + + +@_attrs_define +class AppRunnerJobMetadata: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_runner_job_metadata = cls() + + app_runner_job_metadata.additional_properties = d + return app_runner_job_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_operation_type.py b/nuon/models/app_runner_job_operation_type.py new file mode 100644 index 00000000..72971d55 --- /dev/null +++ b/nuon/models/app_runner_job_operation_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class AppRunnerJobOperationType(str, Enum): + APPLY_PLAN = "apply-plan" + BUILD = "build" + CREATE_APPLY_PLAN = "create-apply-plan" + CREATE_TEARDOWN_PLAN = "create-teardown-plan" + EXEC = "exec" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_job_outputs.py b/nuon/models/app_runner_job_outputs.py new file mode 100644 index 00000000..63ce8ca0 --- /dev/null +++ b/nuon/models/app_runner_job_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppRunnerJobOutputs") + + +@_attrs_define +class AppRunnerJobOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_runner_job_outputs = cls() + + app_runner_job_outputs.additional_properties = d + return app_runner_job_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_job_status.py b/nuon/models/app_runner_job_status.py new file mode 100644 index 00000000..75a1f8fa --- /dev/null +++ b/nuon/models/app_runner_job_status.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class AppRunnerJobStatus(str, Enum): + AVAILABLE = "available" + CANCELLED = "cancelled" + FAILED = "failed" + FINISHED = "finished" + IN_PROGRESS = "in-progress" + NOT_ATTEMPTED = "not-attempted" + QUEUED = "queued" + TIMED_OUT = "timed-out" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_job_type.py b/nuon/models/app_runner_job_type.py new file mode 100644 index 00000000..5554d910 --- /dev/null +++ b/nuon/models/app_runner_job_type.py @@ -0,0 +1,34 @@ +from enum import Enum + + +class AppRunnerJobType(str, Enum): + ACTIONS_WORKFLOW = "actions-workflow" + CONTAINER_IMAGE_BUILD = "container-image-build" + DOCKER_BUILD = "docker-build" + HEALTH_CHECK = "health-check" + HELM_CHART_BUILD = "helm-chart-build" + HELM_CHART_DEPLOY = "helm-chart-deploy" + JOB_DEPLOY = "job-deploy" + KUBERNETES_MANIFEST_DEPLOY = "kubernetes-manifest-deploy" + MNG_RUNNER_RESTART = "mng-runner-restart" + MNG_RUNNER_UPDATE_VERSION = "mng-runner-update-version" + MNG_SHUT_DOWN = "mng-shut-down" + MNG_VM_SHUT_DOWN = "mng-vm-shut-down" + NOOP = "noop" + NOOP_BUILD = "noop-build" + NOOP_DEPLOY = "noop-deploy" + NOOP_SYNC = "noop-sync" + OCI_SYNC = "oci-sync" + RUNNER_HELM = "runner-helm" + RUNNER_LOCAL = "runner-local" + RUNNER_TERRAFORM = "runner-terraform" + SANDBOX_SYNC_SECRETS = "sandbox-sync-secrets" + SANDBOX_TERRAFORM = "sandbox-terraform" + SANDBOX_TERRAFORM_PLAN = "sandbox-terraform-plan" + SHUT_DOWN = "shut-down" + TERRAFORM_DEPLOY = "terraform-deploy" + TERRAFORM_MODULE_BUILD = "terraform-module-build" + UPDATE_VERSION = "update-version" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_operation.py b/nuon/models/app_runner_operation.py new file mode 100644 index 00000000..b327004a --- /dev/null +++ b/nuon/models/app_runner_operation.py @@ -0,0 +1,152 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_runner_operation_type import AppRunnerOperationType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_log_stream import AppLogStream + + +T = TypeVar("T", bound="AppRunnerOperation") + + +@_attrs_define +class AppRunnerOperation: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + log_stream (Union[Unset, AppLogStream]): + operation_type (Union[Unset, AppRunnerOperationType]): + runner_id (Union[Unset, str]): + status (Union[Unset, str]): + status_description (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + log_stream: Union[Unset, "AppLogStream"] = UNSET + operation_type: Union[Unset, AppRunnerOperationType] = UNSET + runner_id: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + status_description: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + log_stream: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.log_stream, Unset): + log_stream = self.log_stream.to_dict() + + operation_type: Union[Unset, str] = UNSET + if not isinstance(self.operation_type, Unset): + operation_type = self.operation_type.value + + runner_id = self.runner_id + + status = self.status + + status_description = self.status_description + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if log_stream is not UNSET: + field_dict["log_stream"] = log_stream + if operation_type is not UNSET: + field_dict["operation_type"] = operation_type + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_log_stream import AppLogStream + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _log_stream = d.pop("log_stream", UNSET) + log_stream: Union[Unset, AppLogStream] + if isinstance(_log_stream, Unset): + log_stream = UNSET + else: + log_stream = AppLogStream.from_dict(_log_stream) + + _operation_type = d.pop("operation_type", UNSET) + operation_type: Union[Unset, AppRunnerOperationType] + if isinstance(_operation_type, Unset): + operation_type = UNSET + else: + operation_type = AppRunnerOperationType(_operation_type) + + runner_id = d.pop("runner_id", UNSET) + + status = d.pop("status", UNSET) + + status_description = d.pop("status_description", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_runner_operation = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + log_stream=log_stream, + operation_type=operation_type, + runner_id=runner_id, + status=status, + status_description=status_description, + updated_at=updated_at, + ) + + app_runner_operation.additional_properties = d + return app_runner_operation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_runner_operation_type.py b/nuon/models/app_runner_operation_type.py new file mode 100644 index 00000000..7cd8b145 --- /dev/null +++ b/nuon/models/app_runner_operation_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AppRunnerOperationType(str, Enum): + DEPROVISION = "deprovision" + PROVISION = "provision" + PROVISION_SERVICE_ACCOUNT = "provision_service_account" + REPROVISION = "reprovision" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_runner_status.py b/nuon/models/app_runner_status.py new file mode 100644 index 00000000..aca1b4c8 --- /dev/null +++ b/nuon/models/app_runner_status.py @@ -0,0 +1,17 @@ +from enum import Enum + + +class AppRunnerStatus(str, Enum): + ACTIVE = "active" + AWAITING_INSTALL_STACK_RUN = "awaiting-install-stack-run" + DEPROVISIONED = "deprovisioned" + DEPROVISIONING = "deprovisioning" + ERROR = "error" + OFFLINE = "offline" + PENDING = "pending" + PROVISIONING = "provisioning" + REPROVISIONING = "reprovisioning" + UNKNOWN = "unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_sandbox_run_type.py b/nuon/models/app_sandbox_run_type.py new file mode 100644 index 00000000..3f0c6c4a --- /dev/null +++ b/nuon/models/app_sandbox_run_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AppSandboxRunType(str, Enum): + DEPROVISION = "deprovision" + PROVISION = "provision" + REPROVISION = "reprovision" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_stack_type.py b/nuon/models/app_stack_type.py new file mode 100644 index 00000000..8e51431c --- /dev/null +++ b/nuon/models/app_stack_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AppStackType(str, Enum): + AWS_CLOUDFORMATION = "aws-cloudformation" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_status.py b/nuon/models/app_status.py new file mode 100644 index 00000000..c1496f3c --- /dev/null +++ b/nuon/models/app_status.py @@ -0,0 +1,37 @@ +from enum import Enum + + +class AppStatus(str, Enum): + ACTIVE = "active" + APPLYING = "applying" + APPROVAL_AWAITING = "approval-awaiting" + APPROVAL_DENIED = "approval-denied" + APPROVAL_EXPIRED = "approval-expired" + APPROVAL_RETRY = "approval-retry" + APPROVED = "approved" + AUTO_SKIPPED = "auto-skipped" + AWAITING_USER_RUN = "awaiting-user-run" + BUILDING = "building" + CANCELLED = "cancelled" + CHECKING_PLAN = "checking-plan" + DELETING = "deleting" + DISCARDED = "discarded" + DRIFTED = "drifted" + ERROR = "error" + EXPIRED = "expired" + GENERATING = "generating" + IN_PROGRESS = "in-progress" + NOOP = "noop" + NOT_ATTEMPTED = "not-attempted" + NO_DRIFT = "no-drift" + OUTDATED = "outdated" + PENDING = "pending" + PLANNING = "planning" + PROVISIONING = "provisioning" + QUEUED = "queued" + RETRYING = "retrying" + SUCCESS = "success" + USER_SKIPPED = "user-skipped" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_step_error_behavior.py b/nuon/models/app_step_error_behavior.py new file mode 100644 index 00000000..323570f9 --- /dev/null +++ b/nuon/models/app_step_error_behavior.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AppStepErrorBehavior(str, Enum): + ABORT = "abort" + CONTINUE = "continue" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_terraform_lock.py b/nuon/models/app_terraform_lock.py new file mode 100644 index 00000000..07595a65 --- /dev/null +++ b/nuon/models/app_terraform_lock.py @@ -0,0 +1,113 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppTerraformLock") + + +@_attrs_define +class AppTerraformLock: + """ + Attributes: + created (Union[Unset, str]): + id (Union[Unset, str]): + info (Union[Unset, str]): + operation (Union[Unset, str]): + path (Union[Unset, str]): + version (Union[Unset, Any]): + who (Union[Unset, str]): + """ + + created: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + info: Union[Unset, str] = UNSET + operation: Union[Unset, str] = UNSET + path: Union[Unset, str] = UNSET + version: Union[Unset, Any] = UNSET + who: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created = self.created + + id = self.id + + info = self.info + + operation = self.operation + + path = self.path + + version = self.version + + who = self.who + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if id is not UNSET: + field_dict["id"] = id + if info is not UNSET: + field_dict["info"] = info + if operation is not UNSET: + field_dict["operation"] = operation + if path is not UNSET: + field_dict["path"] = path + if version is not UNSET: + field_dict["version"] = version + if who is not UNSET: + field_dict["who"] = who + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created = d.pop("created", UNSET) + + id = d.pop("id", UNSET) + + info = d.pop("info", UNSET) + + operation = d.pop("operation", UNSET) + + path = d.pop("path", UNSET) + + version = d.pop("version", UNSET) + + who = d.pop("who", UNSET) + + app_terraform_lock = cls( + created=created, + id=id, + info=info, + operation=operation, + path=path, + version=version, + who=who, + ) + + app_terraform_lock.additional_properties = d + return app_terraform_lock + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_module_component_config.py b/nuon/models/app_terraform_module_component_config.py new file mode 100644 index 00000000..fdfbcf50 --- /dev/null +++ b/nuon/models/app_terraform_module_component_config.py @@ -0,0 +1,191 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + from ..models.app_terraform_module_component_config_env_vars import AppTerraformModuleComponentConfigEnvVars + from ..models.app_terraform_module_component_config_variables import AppTerraformModuleComponentConfigVariables + + +T = TypeVar("T", bound="AppTerraformModuleComponentConfig") + + +@_attrs_define +class AppTerraformModuleComponentConfig: + """ + Attributes: + component_config_connection_id (Union[Unset, str]): parent reference + connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + env_vars (Union[Unset, AppTerraformModuleComponentConfigEnvVars]): + id (Union[Unset, str]): + public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): + updated_at (Union[Unset, str]): + variables (Union[Unset, AppTerraformModuleComponentConfigVariables]): + variables_files (Union[Unset, list[str]]): + version (Union[Unset, str]): terraform configuration values + """ + + component_config_connection_id: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + env_vars: Union[Unset, "AppTerraformModuleComponentConfigEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET + updated_at: Union[Unset, str] = UNSET + variables: Union[Unset, "AppTerraformModuleComponentConfigVariables"] = UNSET + variables_files: Union[Unset, list[str]] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + component_config_connection_id = self.component_config_connection_id + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + created_at = self.created_at + + created_by_id = self.created_by_id + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + updated_at = self.updated_at + + variables: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.variables, Unset): + variables = self.variables.to_dict() + + variables_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.variables_files, Unset): + variables_files = self.variables_files + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if component_config_connection_id is not UNSET: + field_dict["component_config_connection_id"] = component_config_connection_id + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if variables is not UNSET: + field_dict["variables"] = variables + if variables_files is not UNSET: + field_dict["variables_files"] = variables_files + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig + from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + from ..models.app_terraform_module_component_config_env_vars import AppTerraformModuleComponentConfigEnvVars + from ..models.app_terraform_module_component_config_variables import AppTerraformModuleComponentConfigVariables + + d = dict(src_dict) + component_config_connection_id = d.pop("component_config_connection_id", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = AppConnectedGithubVCSConfig.from_dict(_connected_github_vcs_config) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, AppTerraformModuleComponentConfigEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = AppTerraformModuleComponentConfigEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) + + updated_at = d.pop("updated_at", UNSET) + + _variables = d.pop("variables", UNSET) + variables: Union[Unset, AppTerraformModuleComponentConfigVariables] + if isinstance(_variables, Unset): + variables = UNSET + else: + variables = AppTerraformModuleComponentConfigVariables.from_dict(_variables) + + variables_files = cast(list[str], d.pop("variables_files", UNSET)) + + version = d.pop("version", UNSET) + + app_terraform_module_component_config = cls( + component_config_connection_id=component_config_connection_id, + connected_github_vcs_config=connected_github_vcs_config, + created_at=created_at, + created_by_id=created_by_id, + env_vars=env_vars, + id=id, + public_git_vcs_config=public_git_vcs_config, + updated_at=updated_at, + variables=variables, + variables_files=variables_files, + version=version, + ) + + app_terraform_module_component_config.additional_properties = d + return app_terraform_module_component_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_module_component_config_env_vars.py b/nuon/models/app_terraform_module_component_config_env_vars.py new file mode 100644 index 00000000..eaeb8778 --- /dev/null +++ b/nuon/models/app_terraform_module_component_config_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppTerraformModuleComponentConfigEnvVars") + + +@_attrs_define +class AppTerraformModuleComponentConfigEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_terraform_module_component_config_env_vars = cls() + + app_terraform_module_component_config_env_vars.additional_properties = d + return app_terraform_module_component_config_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_module_component_config_variables.py b/nuon/models/app_terraform_module_component_config_variables.py new file mode 100644 index 00000000..6be5d8b3 --- /dev/null +++ b/nuon/models/app_terraform_module_component_config_variables.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppTerraformModuleComponentConfigVariables") + + +@_attrs_define +class AppTerraformModuleComponentConfigVariables: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_terraform_module_component_config_variables = cls() + + app_terraform_module_component_config_variables.additional_properties = d + return app_terraform_module_component_config_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_state_instance.py b/nuon/models/app_terraform_state_instance.py new file mode 100644 index 00000000..4ea01d7d --- /dev/null +++ b/nuon/models/app_terraform_state_instance.py @@ -0,0 +1,92 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_terraform_state_instance_attributes import AppTerraformStateInstanceAttributes + + +T = TypeVar("T", bound="AppTerraformStateInstance") + + +@_attrs_define +class AppTerraformStateInstance: + """ + Attributes: + attributes (Union[Unset, AppTerraformStateInstanceAttributes]): + schema_version (Union[Unset, int]): + sensitive_attributes (Union[Unset, list[Any]]): + """ + + attributes: Union[Unset, "AppTerraformStateInstanceAttributes"] = UNSET + schema_version: Union[Unset, int] = UNSET + sensitive_attributes: Union[Unset, list[Any]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attributes: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + schema_version = self.schema_version + + sensitive_attributes: Union[Unset, list[Any]] = UNSET + if not isinstance(self.sensitive_attributes, Unset): + sensitive_attributes = self.sensitive_attributes + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attributes is not UNSET: + field_dict["attributes"] = attributes + if schema_version is not UNSET: + field_dict["schema_version"] = schema_version + if sensitive_attributes is not UNSET: + field_dict["sensitive_attributes"] = sensitive_attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_terraform_state_instance_attributes import AppTerraformStateInstanceAttributes + + d = dict(src_dict) + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, AppTerraformStateInstanceAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = AppTerraformStateInstanceAttributes.from_dict(_attributes) + + schema_version = d.pop("schema_version", UNSET) + + sensitive_attributes = cast(list[Any], d.pop("sensitive_attributes", UNSET)) + + app_terraform_state_instance = cls( + attributes=attributes, + schema_version=schema_version, + sensitive_attributes=sensitive_attributes, + ) + + app_terraform_state_instance.additional_properties = d + return app_terraform_state_instance + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_state_instance_attributes.py b/nuon/models/app_terraform_state_instance_attributes.py new file mode 100644 index 00000000..9c9c3294 --- /dev/null +++ b/nuon/models/app_terraform_state_instance_attributes.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppTerraformStateInstanceAttributes") + + +@_attrs_define +class AppTerraformStateInstanceAttributes: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_terraform_state_instance_attributes = cls() + + app_terraform_state_instance_attributes.additional_properties = d + return app_terraform_state_instance_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_state_resource.py b/nuon/models/app_terraform_state_resource.py new file mode 100644 index 00000000..f0b75eb8 --- /dev/null +++ b/nuon/models/app_terraform_state_resource.py @@ -0,0 +1,111 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_terraform_state_instance import AppTerraformStateInstance + + +T = TypeVar("T", bound="AppTerraformStateResource") + + +@_attrs_define +class AppTerraformStateResource: + """ + Attributes: + instances (Union[Unset, list['AppTerraformStateInstance']]): + mode (Union[Unset, str]): + name (Union[Unset, str]): + provider (Union[Unset, str]): + type_ (Union[Unset, str]): + """ + + instances: Union[Unset, list["AppTerraformStateInstance"]] = UNSET + mode: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + provider: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + instances: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.instances, Unset): + instances = [] + for instances_item_data in self.instances: + instances_item = instances_item_data.to_dict() + instances.append(instances_item) + + mode = self.mode + + name = self.name + + provider = self.provider + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if instances is not UNSET: + field_dict["instances"] = instances + if mode is not UNSET: + field_dict["mode"] = mode + if name is not UNSET: + field_dict["name"] = name + if provider is not UNSET: + field_dict["provider"] = provider + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_terraform_state_instance import AppTerraformStateInstance + + d = dict(src_dict) + instances = [] + _instances = d.pop("instances", UNSET) + for instances_item_data in _instances or []: + instances_item = AppTerraformStateInstance.from_dict(instances_item_data) + + instances.append(instances_item) + + mode = d.pop("mode", UNSET) + + name = d.pop("name", UNSET) + + provider = d.pop("provider", UNSET) + + type_ = d.pop("type", UNSET) + + app_terraform_state_resource = cls( + instances=instances, + mode=mode, + name=name, + provider=provider, + type_=type_, + ) + + app_terraform_state_resource.additional_properties = d + return app_terraform_state_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/nuon/models/app_terraform_workspace.py b/nuon/models/app_terraform_workspace.py new file mode 100644 index 00000000..8bf33dc7 --- /dev/null +++ b/nuon/models/app_terraform_workspace.py @@ -0,0 +1,113 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppTerraformWorkspace") + + +@_attrs_define +class AppTerraformWorkspace: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_terraform_workspace = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + owner_id=owner_id, + owner_type=owner_type, + updated_at=updated_at, + ) + + app_terraform_workspace.additional_properties = d + return app_terraform_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/nuon/models/app_terraform_workspace_lock.py b/nuon/models/app_terraform_workspace_lock.py new file mode 100644 index 00000000..d670a470 --- /dev/null +++ b/nuon/models/app_terraform_workspace_lock.py @@ -0,0 +1,145 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job import AppRunnerJob + from ..models.app_terraform_lock import AppTerraformLock + + +T = TypeVar("T", bound="AppTerraformWorkspaceLock") + + +@_attrs_define +class AppTerraformWorkspaceLock: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + lock (Union[Unset, AppTerraformLock]): + runner_job (Union[Unset, AppRunnerJob]): + runner_job_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + workspace_id (Union[Unset, str]): Foreign key to TerraformWorkspace with unique constraint to prevent multiple + active locks + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + lock: Union[Unset, "AppTerraformLock"] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + runner_job_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + lock: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.lock, Unset): + lock = self.lock.to_dict() + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + runner_job_id = self.runner_job_id + + updated_at = self.updated_at + + workspace_id = self.workspace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if lock is not UNSET: + field_dict["lock"] = lock + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job import AppRunnerJob + from ..models.app_terraform_lock import AppTerraformLock + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _lock = d.pop("lock", UNSET) + lock: Union[Unset, AppTerraformLock] + if isinstance(_lock, Unset): + lock = UNSET + else: + lock = AppTerraformLock.from_dict(_lock) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + runner_job_id = d.pop("runner_job_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + workspace_id = d.pop("workspace_id", UNSET) + + app_terraform_workspace_lock = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + lock=lock, + runner_job=runner_job, + runner_job_id=runner_job_id, + updated_at=updated_at, + workspace_id=workspace_id, + ) + + app_terraform_workspace_lock.additional_properties = d + return app_terraform_workspace_lock + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_workspace_state.py b/nuon/models/app_terraform_workspace_state.py new file mode 100644 index 00000000..743a551f --- /dev/null +++ b/nuon/models/app_terraform_workspace_state.py @@ -0,0 +1,173 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job import AppRunnerJob + from ..models.app_terraform_workspace import AppTerraformWorkspace + + +T = TypeVar("T", bound="AppTerraformWorkspaceState") + + +@_attrs_define +class AppTerraformWorkspaceState: + """ + Attributes: + contents (Union[Unset, list[int]]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_id (Union[Unset, str]): + revision (Union[Unset, int]): + runner_job (Union[Unset, AppRunnerJob]): + runner_job_id (Union[Unset, str]): + terraform_workspace (Union[Unset, AppTerraformWorkspace]): + terraform_workspace_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + contents: Union[Unset, list[int]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + revision: Union[Unset, int] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + runner_job_id: Union[Unset, str] = UNSET + terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET + terraform_workspace_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + contents: Union[Unset, list[int]] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_id = self.org_id + + revision = self.revision + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + runner_job_id = self.runner_job_id + + terraform_workspace: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_workspace, Unset): + terraform_workspace = self.terraform_workspace.to_dict() + + terraform_workspace_id = self.terraform_workspace_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if revision is not UNSET: + field_dict["revision"] = revision + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if terraform_workspace is not UNSET: + field_dict["terraform_workspace"] = terraform_workspace + if terraform_workspace_id is not UNSET: + field_dict["terraform_workspace_id"] = terraform_workspace_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job import AppRunnerJob + from ..models.app_terraform_workspace import AppTerraformWorkspace + + d = dict(src_dict) + contents = cast(list[int], d.pop("contents", UNSET)) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_id = d.pop("org_id", UNSET) + + revision = d.pop("revision", UNSET) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + runner_job_id = d.pop("runner_job_id", UNSET) + + _terraform_workspace = d.pop("terraform_workspace", UNSET) + terraform_workspace: Union[Unset, AppTerraformWorkspace] + if isinstance(_terraform_workspace, Unset): + terraform_workspace = UNSET + else: + terraform_workspace = AppTerraformWorkspace.from_dict(_terraform_workspace) + + terraform_workspace_id = d.pop("terraform_workspace_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_terraform_workspace_state = cls( + contents=contents, + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_id=org_id, + revision=revision, + runner_job=runner_job, + runner_job_id=runner_job_id, + terraform_workspace=terraform_workspace, + terraform_workspace_id=terraform_workspace_id, + updated_at=updated_at, + ) + + app_terraform_workspace_state.additional_properties = d + return app_terraform_workspace_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_terraform_workspace_state_json.py b/nuon/models/app_terraform_workspace_state_json.py new file mode 100644 index 00000000..80a90ec6 --- /dev/null +++ b/nuon/models/app_terraform_workspace_state_json.py @@ -0,0 +1,138 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job import AppRunnerJob + + +T = TypeVar("T", bound="AppTerraformWorkspaceStateJSON") + + +@_attrs_define +class AppTerraformWorkspaceStateJSON: + """ + Attributes: + contents (Union[Unset, list[int]]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + runner_job (Union[Unset, AppRunnerJob]): + runner_job_id (Union[Unset, str]): + updated_at (Union[Unset, str]): + workspace_id (Union[Unset, str]): Foreign key to TerraformWorkspace with unique constraint to prevent + conflicting states for a workspace + """ + + contents: Union[Unset, list[int]] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + runner_job_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + contents: Union[Unset, list[int]] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + runner_job_id = self.runner_job_id + + updated_at = self.updated_at + + workspace_id = self.workspace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job import AppRunnerJob + + d = dict(src_dict) + contents = cast(list[int], d.pop("contents", UNSET)) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + runner_job_id = d.pop("runner_job_id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + workspace_id = d.pop("workspace_id", UNSET) + + app_terraform_workspace_state_json = cls( + contents=contents, + created_at=created_at, + created_by_id=created_by_id, + id=id, + runner_job=runner_job, + runner_job_id=runner_job_id, + updated_at=updated_at, + workspace_id=workspace_id, + ) + + app_terraform_workspace_state_json.additional_properties = d + return app_terraform_workspace_state_json + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_user_journey.py b/nuon/models/app_user_journey.py new file mode 100644 index 00000000..aa47d6e0 --- /dev/null +++ b/nuon/models/app_user_journey.py @@ -0,0 +1,93 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_user_journey_step import AppUserJourneyStep + + +T = TypeVar("T", bound="AppUserJourney") + + +@_attrs_define +class AppUserJourney: + """ + Attributes: + name (Union[Unset, str]): + steps (Union[Unset, list['AppUserJourneyStep']]): + title (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + steps: Union[Unset, list["AppUserJourneyStep"]] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if steps is not UNSET: + field_dict["steps"] = steps + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_user_journey_step import AppUserJourneyStep + + d = dict(src_dict) + name = d.pop("name", UNSET) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = AppUserJourneyStep.from_dict(steps_item_data) + + steps.append(steps_item) + + title = d.pop("title", UNSET) + + app_user_journey = cls( + name=name, + steps=steps, + title=title, + ) + + app_user_journey.additional_properties = d + return app_user_journey + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_user_journey_step.py b/nuon/models/app_user_journey_step.py new file mode 100644 index 00000000..02875c80 --- /dev/null +++ b/nuon/models/app_user_journey_step.py @@ -0,0 +1,126 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_user_journey_step_metadata import AppUserJourneyStepMetadata + + +T = TypeVar("T", bound="AppUserJourneyStep") + + +@_attrs_define +class AppUserJourneyStep: + """ + Attributes: + complete (Union[Unset, bool]): + completed_at (Union[Unset, str]): Top-level completion tracking fields + completion_method (Union[Unset, str]): + completion_source (Union[Unset, str]): + metadata (Union[Unset, AppUserJourneyStepMetadata]): Flexible metadata for business data + name (Union[Unset, str]): + title (Union[Unset, str]): + """ + + complete: Union[Unset, bool] = UNSET + completed_at: Union[Unset, str] = UNSET + completion_method: Union[Unset, str] = UNSET + completion_source: Union[Unset, str] = UNSET + metadata: Union[Unset, "AppUserJourneyStepMetadata"] = UNSET + name: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + complete = self.complete + + completed_at = self.completed_at + + completion_method = self.completion_method + + completion_source = self.completion_source + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + name = self.name + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if complete is not UNSET: + field_dict["complete"] = complete + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if completion_method is not UNSET: + field_dict["completion_method"] = completion_method + if completion_source is not UNSET: + field_dict["completion_source"] = completion_source + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_user_journey_step_metadata import AppUserJourneyStepMetadata + + d = dict(src_dict) + complete = d.pop("complete", UNSET) + + completed_at = d.pop("completed_at", UNSET) + + completion_method = d.pop("completion_method", UNSET) + + completion_source = d.pop("completion_source", UNSET) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppUserJourneyStepMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppUserJourneyStepMetadata.from_dict(_metadata) + + name = d.pop("name", UNSET) + + title = d.pop("title", UNSET) + + app_user_journey_step = cls( + complete=complete, + completed_at=completed_at, + completion_method=completion_method, + completion_source=completion_source, + metadata=metadata, + name=name, + title=title, + ) + + app_user_journey_step.additional_properties = d + return app_user_journey_step + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_user_journey_step_metadata.py b/nuon/models/app_user_journey_step_metadata.py new file mode 100644 index 00000000..bb98982e --- /dev/null +++ b/nuon/models/app_user_journey_step_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppUserJourneyStepMetadata") + + +@_attrs_define +class AppUserJourneyStepMetadata: + """Flexible metadata for business data""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_user_journey_step_metadata = cls() + + app_user_journey_step_metadata.additional_properties = d + return app_user_journey_step_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/nuon/models/app_vcs_connection.py b/nuon/models/app_vcs_connection.py new file mode 100644 index 00000000..77ffc23a --- /dev/null +++ b/nuon/models/app_vcs_connection.py @@ -0,0 +1,138 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_vcs_connection_commit import AppVCSConnectionCommit + + +T = TypeVar("T", bound="AppVCSConnection") + + +@_attrs_define +class AppVCSConnection: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + github_account_id (Union[Unset, str]): + github_account_name (Union[Unset, str]): + github_install_id (Union[Unset, str]): + id (Union[Unset, str]): + updated_at (Union[Unset, str]): + vcs_connection_commit (Union[Unset, list['AppVCSConnectionCommit']]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + github_account_id: Union[Unset, str] = UNSET + github_account_name: Union[Unset, str] = UNSET + github_install_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + vcs_connection_commit: Union[Unset, list["AppVCSConnectionCommit"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + github_account_id = self.github_account_id + + github_account_name = self.github_account_name + + github_install_id = self.github_install_id + + id = self.id + + updated_at = self.updated_at + + vcs_connection_commit: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.vcs_connection_commit, Unset): + vcs_connection_commit = [] + for vcs_connection_commit_item_data in self.vcs_connection_commit: + vcs_connection_commit_item = vcs_connection_commit_item_data.to_dict() + vcs_connection_commit.append(vcs_connection_commit_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if github_account_id is not UNSET: + field_dict["github_account_id"] = github_account_id + if github_account_name is not UNSET: + field_dict["github_account_name"] = github_account_name + if github_install_id is not UNSET: + field_dict["github_install_id"] = github_install_id + if id is not UNSET: + field_dict["id"] = id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vcs_connection_commit is not UNSET: + field_dict["vcs_connection_commit"] = vcs_connection_commit + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_vcs_connection_commit import AppVCSConnectionCommit + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + github_account_id = d.pop("github_account_id", UNSET) + + github_account_name = d.pop("github_account_name", UNSET) + + github_install_id = d.pop("github_install_id", UNSET) + + id = d.pop("id", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + vcs_connection_commit = [] + _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) + for vcs_connection_commit_item_data in _vcs_connection_commit or []: + vcs_connection_commit_item = AppVCSConnectionCommit.from_dict(vcs_connection_commit_item_data) + + vcs_connection_commit.append(vcs_connection_commit_item) + + app_vcs_connection = cls( + created_at=created_at, + created_by_id=created_by_id, + github_account_id=github_account_id, + github_account_name=github_account_name, + github_install_id=github_install_id, + id=id, + updated_at=updated_at, + vcs_connection_commit=vcs_connection_commit, + ) + + app_vcs_connection.additional_properties = d + return app_vcs_connection + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_vcs_connection_commit.py b/nuon/models/app_vcs_connection_commit.py new file mode 100644 index 00000000..6c8203a3 --- /dev/null +++ b/nuon/models/app_vcs_connection_commit.py @@ -0,0 +1,131 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppVCSConnectionCommit") + + +@_attrs_define +class AppVCSConnectionCommit: + """ + Attributes: + author_email (Union[Unset, str]): + author_name (Union[Unset, str]): + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + message (Union[Unset, str]): + sha (Union[Unset, str]): + updated_at (Union[Unset, str]): + vcs_connection_id (Union[Unset, str]): + """ + + author_email: Union[Unset, str] = UNSET + author_name: Union[Unset, str] = UNSET + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + sha: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + vcs_connection_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + author_email = self.author_email + + author_name = self.author_name + + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + message = self.message + + sha = self.sha + + updated_at = self.updated_at + + vcs_connection_id = self.vcs_connection_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author_email is not UNSET: + field_dict["author_email"] = author_email + if author_name is not UNSET: + field_dict["author_name"] = author_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if message is not UNSET: + field_dict["message"] = message + if sha is not UNSET: + field_dict["sha"] = sha + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if vcs_connection_id is not UNSET: + field_dict["vcs_connection_id"] = vcs_connection_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + author_email = d.pop("author_email", UNSET) + + author_name = d.pop("author_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + message = d.pop("message", UNSET) + + sha = d.pop("sha", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + vcs_connection_id = d.pop("vcs_connection_id", UNSET) + + app_vcs_connection_commit = cls( + author_email=author_email, + author_name=author_name, + created_at=created_at, + created_by_id=created_by_id, + id=id, + message=message, + sha=sha, + updated_at=updated_at, + vcs_connection_id=vcs_connection_id, + ) + + app_vcs_connection_commit.additional_properties = d + return app_vcs_connection_commit + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_waitlist.py b/nuon/models/app_waitlist.py new file mode 100644 index 00000000..45356a2c --- /dev/null +++ b/nuon/models/app_waitlist.py @@ -0,0 +1,95 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppWaitlist") + + +@_attrs_define +class AppWaitlist: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + org_name (Union[Unset, str]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + org_name: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + org_name = self.org_name + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if org_name is not UNSET: + field_dict["org_name"] = org_name + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + org_name = d.pop("org_name", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + app_waitlist = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + org_name=org_name, + updated_at=updated_at, + ) + + app_waitlist.additional_properties = d + return app_waitlist + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow.py b/nuon/models/app_workflow.py new file mode 100644 index 00000000..a04ecf71 --- /dev/null +++ b/nuon/models/app_workflow.py @@ -0,0 +1,371 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..models.app_step_error_behavior import AppStepErrorBehavior +from ..models.app_workflow_type import AppWorkflowType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + from ..models.app_install_deploy import AppInstallDeploy + from ..models.app_install_sandbox_run import AppInstallSandboxRun + from ..models.app_workflow_links import AppWorkflowLinks + from ..models.app_workflow_metadata import AppWorkflowMetadata + from ..models.app_workflow_step import AppWorkflowStep + + +T = TypeVar("T", bound="AppWorkflow") + + +@_attrs_define +class AppWorkflow: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + created_at (Union[Unset, str]): + created_by (Union[Unset, AppAccount]): + created_by_id (Union[Unset, str]): + execution_time (Union[Unset, int]): + finished (Union[Unset, bool]): + finished_at (Union[Unset, str]): + id (Union[Unset, str]): + install_action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): + install_deploys (Union[Unset, list['AppInstallDeploy']]): + install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): + links (Union[Unset, AppWorkflowLinks]): + metadata (Union[Unset, AppWorkflowMetadata]): + name (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + plan_only (Union[Unset, bool]): + started_at (Union[Unset, str]): + status (Union[Unset, AppCompositeStatus]): + step_error_behavior (Union[Unset, AppStepErrorBehavior]): + steps (Union[Unset, list['AppWorkflowStep']]): steps represent each piece of the workflow + type_ (Union[Unset, AppWorkflowType]): + updated_at (Union[Unset, str]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + created_at: Union[Unset, str] = UNSET + created_by: Union[Unset, "AppAccount"] = UNSET + created_by_id: Union[Unset, str] = UNSET + execution_time: Union[Unset, int] = UNSET + finished: Union[Unset, bool] = UNSET + finished_at: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET + install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET + install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET + links: Union[Unset, "AppWorkflowLinks"] = UNSET + metadata: Union[Unset, "AppWorkflowMetadata"] = UNSET + name: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + plan_only: Union[Unset, bool] = UNSET + started_at: Union[Unset, str] = UNSET + status: Union[Unset, "AppCompositeStatus"] = UNSET + step_error_behavior: Union[Unset, AppStepErrorBehavior] = UNSET + steps: Union[Unset, list["AppWorkflowStep"]] = UNSET + type_: Union[Unset, AppWorkflowType] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + created_at = self.created_at + + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_by_id = self.created_by_id + + execution_time = self.execution_time + + finished = self.finished + + finished_at = self.finished_at + + id = self.id + + install_action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_action_workflow_runs, Unset): + install_action_workflow_runs = [] + for install_action_workflow_runs_item_data in self.install_action_workflow_runs: + install_action_workflow_runs_item = install_action_workflow_runs_item_data.to_dict() + install_action_workflow_runs.append(install_action_workflow_runs_item) + + install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_deploys, Unset): + install_deploys = [] + for install_deploys_item_data in self.install_deploys: + install_deploys_item = install_deploys_item_data.to_dict() + install_deploys.append(install_deploys_item) + + install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.install_sandbox_runs, Unset): + install_sandbox_runs = [] + for install_sandbox_runs_item_data in self.install_sandbox_runs: + install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() + install_sandbox_runs.append(install_sandbox_runs_item) + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + name = self.name + + owner_id = self.owner_id + + owner_type = self.owner_type + + plan_only = self.plan_only + + started_at = self.started_at + + status: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + step_error_behavior: Union[Unset, str] = UNSET + if not isinstance(self.step_error_behavior, Unset): + step_error_behavior = self.step_error_behavior.value + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if execution_time is not UNSET: + field_dict["execution_time"] = execution_time + if finished is not UNSET: + field_dict["finished"] = finished + if finished_at is not UNSET: + field_dict["finished_at"] = finished_at + if id is not UNSET: + field_dict["id"] = id + if install_action_workflow_runs is not UNSET: + field_dict["install_action_workflow_runs"] = install_action_workflow_runs + if install_deploys is not UNSET: + field_dict["install_deploys"] = install_deploys + if install_sandbox_runs is not UNSET: + field_dict["install_sandbox_runs"] = install_sandbox_runs + if links is not UNSET: + field_dict["links"] = links + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if step_error_behavior is not UNSET: + field_dict["step_error_behavior"] = step_error_behavior + if steps is not UNSET: + field_dict["steps"] = steps + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_install_action_workflow_run import AppInstallActionWorkflowRun + from ..models.app_install_deploy import AppInstallDeploy + from ..models.app_install_sandbox_run import AppInstallSandboxRun + from ..models.app_workflow_links import AppWorkflowLinks + from ..models.app_workflow_metadata import AppWorkflowMetadata + from ..models.app_workflow_step import AppWorkflowStep + + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + created_at = d.pop("created_at", UNSET) + + _created_by = d.pop("created_by", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_by_id = d.pop("created_by_id", UNSET) + + execution_time = d.pop("execution_time", UNSET) + + finished = d.pop("finished", UNSET) + + finished_at = d.pop("finished_at", UNSET) + + id = d.pop("id", UNSET) + + install_action_workflow_runs = [] + _install_action_workflow_runs = d.pop("install_action_workflow_runs", UNSET) + for install_action_workflow_runs_item_data in _install_action_workflow_runs or []: + install_action_workflow_runs_item = AppInstallActionWorkflowRun.from_dict( + install_action_workflow_runs_item_data + ) + + install_action_workflow_runs.append(install_action_workflow_runs_item) + + install_deploys = [] + _install_deploys = d.pop("install_deploys", UNSET) + for install_deploys_item_data in _install_deploys or []: + install_deploys_item = AppInstallDeploy.from_dict(install_deploys_item_data) + + install_deploys.append(install_deploys_item) + + install_sandbox_runs = [] + _install_sandbox_runs = d.pop("install_sandbox_runs", UNSET) + for install_sandbox_runs_item_data in _install_sandbox_runs or []: + install_sandbox_runs_item = AppInstallSandboxRun.from_dict(install_sandbox_runs_item_data) + + install_sandbox_runs.append(install_sandbox_runs_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppWorkflowLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppWorkflowLinks.from_dict(_links) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppWorkflowMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppWorkflowMetadata.from_dict(_metadata) + + name = d.pop("name", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + started_at = d.pop("started_at", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppCompositeStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppCompositeStatus.from_dict(_status) + + _step_error_behavior = d.pop("step_error_behavior", UNSET) + step_error_behavior: Union[Unset, AppStepErrorBehavior] + if isinstance(_step_error_behavior, Unset): + step_error_behavior = UNSET + else: + step_error_behavior = AppStepErrorBehavior(_step_error_behavior) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = AppWorkflowStep.from_dict(steps_item_data) + + steps.append(steps_item) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppWorkflowType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppWorkflowType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + app_workflow = cls( + approval_option=approval_option, + created_at=created_at, + created_by=created_by, + created_by_id=created_by_id, + execution_time=execution_time, + finished=finished, + finished_at=finished_at, + id=id, + install_action_workflow_runs=install_action_workflow_runs, + install_deploys=install_deploys, + install_sandbox_runs=install_sandbox_runs, + links=links, + metadata=metadata, + name=name, + owner_id=owner_id, + owner_type=owner_type, + plan_only=plan_only, + started_at=started_at, + status=status, + step_error_behavior=step_error_behavior, + steps=steps, + type_=type_, + updated_at=updated_at, + ) + + app_workflow.additional_properties = d + return app_workflow + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_links.py b/nuon/models/app_workflow_links.py new file mode 100644 index 00000000..284b493f --- /dev/null +++ b/nuon/models/app_workflow_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppWorkflowLinks") + + +@_attrs_define +class AppWorkflowLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_workflow_links = cls() + + app_workflow_links.additional_properties = d + return app_workflow_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_metadata.py b/nuon/models/app_workflow_metadata.py new file mode 100644 index 00000000..07b3e9e4 --- /dev/null +++ b/nuon/models/app_workflow_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppWorkflowMetadata") + + +@_attrs_define +class AppWorkflowMetadata: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_workflow_metadata = cls() + + app_workflow_metadata.additional_properties = d + return app_workflow_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step.py b/nuon/models/app_workflow_step.py new file mode 100644 index 00000000..ca20c92f --- /dev/null +++ b/nuon/models/app_workflow_step.py @@ -0,0 +1,378 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_workflow_step_execution_type import AppWorkflowStepExecutionType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_account import AppAccount + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_workflow_step_approval import AppWorkflowStepApproval + from ..models.app_workflow_step_links import AppWorkflowStepLinks + from ..models.app_workflow_step_metadata import AppWorkflowStepMetadata + from ..models.app_workflow_step_policy_validation import AppWorkflowStepPolicyValidation + + +T = TypeVar("T", bound="AppWorkflowStep") + + +@_attrs_define +class AppWorkflowStep: + """ + Attributes: + approval (Union[Unset, AppWorkflowStepApproval]): + created_at (Union[Unset, str]): + created_by (Union[Unset, AppAccount]): + created_by_id (Union[Unset, str]): + execution_time (Union[Unset, int]): + execution_type (Union[Unset, AppWorkflowStepExecutionType]): + finished (Union[Unset, bool]): + finished_at (Union[Unset, str]): + group_idx (Union[Unset, int]): to group steps which belong to same logical group, eg, plan/apply + group_retry_idx (Union[Unset, int]): counter for every retry attempted on a group + id (Union[Unset, str]): + idx (Union[Unset, int]): + install_workflow_id (Union[Unset, str]): DEPRECATED: this is the install workflow ID, which is now the workflow + ID. + links (Union[Unset, AppWorkflowStepLinks]): + metadata (Union[Unset, AppWorkflowStepMetadata]): + name (Union[Unset, str]): + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + policy_validation (Union[Unset, AppWorkflowStepPolicyValidation]): + retried (Union[Unset, bool]): + retryable (Union[Unset, bool]): + skippable (Union[Unset, bool]): + started_at (Union[Unset, str]): + status (Union[Unset, AppCompositeStatus]): + step_target_id (Union[Unset, str]): the following fields are set _once_ a step is in flight, and are + orchestrated via the step's signal. + + this is a polymorphic gorm relationship to one of the following objects: + + install_cloudformation_stack + install_sandbox_run + install_runner_update + install_deploy + install_action_workflow_run (can be many of these) + step_target_type (Union[Unset, str]): + updated_at (Union[Unset, str]): + workflow_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery + """ + + approval: Union[Unset, "AppWorkflowStepApproval"] = UNSET + created_at: Union[Unset, str] = UNSET + created_by: Union[Unset, "AppAccount"] = UNSET + created_by_id: Union[Unset, str] = UNSET + execution_time: Union[Unset, int] = UNSET + execution_type: Union[Unset, AppWorkflowStepExecutionType] = UNSET + finished: Union[Unset, bool] = UNSET + finished_at: Union[Unset, str] = UNSET + group_idx: Union[Unset, int] = UNSET + group_retry_idx: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + idx: Union[Unset, int] = UNSET + install_workflow_id: Union[Unset, str] = UNSET + links: Union[Unset, "AppWorkflowStepLinks"] = UNSET + metadata: Union[Unset, "AppWorkflowStepMetadata"] = UNSET + name: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + policy_validation: Union[Unset, "AppWorkflowStepPolicyValidation"] = UNSET + retried: Union[Unset, bool] = UNSET + retryable: Union[Unset, bool] = UNSET + skippable: Union[Unset, bool] = UNSET + started_at: Union[Unset, str] = UNSET + status: Union[Unset, "AppCompositeStatus"] = UNSET + step_target_id: Union[Unset, str] = UNSET + step_target_type: Union[Unset, str] = UNSET + updated_at: Union[Unset, str] = UNSET + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.approval, Unset): + approval = self.approval.to_dict() + + created_at = self.created_at + + created_by: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + + created_by_id = self.created_by_id + + execution_time = self.execution_time + + execution_type: Union[Unset, str] = UNSET + if not isinstance(self.execution_type, Unset): + execution_type = self.execution_type.value + + finished = self.finished + + finished_at = self.finished_at + + group_idx = self.group_idx + + group_retry_idx = self.group_retry_idx + + id = self.id + + idx = self.idx + + install_workflow_id = self.install_workflow_id + + links: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + name = self.name + + owner_id = self.owner_id + + owner_type = self.owner_type + + policy_validation: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.policy_validation, Unset): + policy_validation = self.policy_validation.to_dict() + + retried = self.retried + + retryable = self.retryable + + skippable = self.skippable + + started_at = self.started_at + + status: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + step_target_id = self.step_target_id + + step_target_type = self.step_target_type + + updated_at = self.updated_at + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval is not UNSET: + field_dict["approval"] = approval + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if execution_time is not UNSET: + field_dict["execution_time"] = execution_time + if execution_type is not UNSET: + field_dict["execution_type"] = execution_type + if finished is not UNSET: + field_dict["finished"] = finished + if finished_at is not UNSET: + field_dict["finished_at"] = finished_at + if group_idx is not UNSET: + field_dict["group_idx"] = group_idx + if group_retry_idx is not UNSET: + field_dict["group_retry_idx"] = group_retry_idx + if id is not UNSET: + field_dict["id"] = id + if idx is not UNSET: + field_dict["idx"] = idx + if install_workflow_id is not UNSET: + field_dict["install_workflow_id"] = install_workflow_id + if links is not UNSET: + field_dict["links"] = links + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if policy_validation is not UNSET: + field_dict["policy_validation"] = policy_validation + if retried is not UNSET: + field_dict["retried"] = retried + if retryable is not UNSET: + field_dict["retryable"] = retryable + if skippable is not UNSET: + field_dict["skippable"] = skippable + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if step_target_id is not UNSET: + field_dict["step_target_id"] = step_target_id + if step_target_type is not UNSET: + field_dict["step_target_type"] = step_target_type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_account import AppAccount + from ..models.app_composite_status import AppCompositeStatus + from ..models.app_workflow_step_approval import AppWorkflowStepApproval + from ..models.app_workflow_step_links import AppWorkflowStepLinks + from ..models.app_workflow_step_metadata import AppWorkflowStepMetadata + from ..models.app_workflow_step_policy_validation import AppWorkflowStepPolicyValidation + + d = dict(src_dict) + _approval = d.pop("approval", UNSET) + approval: Union[Unset, AppWorkflowStepApproval] + if isinstance(_approval, Unset): + approval = UNSET + else: + approval = AppWorkflowStepApproval.from_dict(_approval) + + created_at = d.pop("created_at", UNSET) + + _created_by = d.pop("created_by", UNSET) + created_by: Union[Unset, AppAccount] + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = AppAccount.from_dict(_created_by) + + created_by_id = d.pop("created_by_id", UNSET) + + execution_time = d.pop("execution_time", UNSET) + + _execution_type = d.pop("execution_type", UNSET) + execution_type: Union[Unset, AppWorkflowStepExecutionType] + if isinstance(_execution_type, Unset): + execution_type = UNSET + else: + execution_type = AppWorkflowStepExecutionType(_execution_type) + + finished = d.pop("finished", UNSET) + + finished_at = d.pop("finished_at", UNSET) + + group_idx = d.pop("group_idx", UNSET) + + group_retry_idx = d.pop("group_retry_idx", UNSET) + + id = d.pop("id", UNSET) + + idx = d.pop("idx", UNSET) + + install_workflow_id = d.pop("install_workflow_id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, AppWorkflowStepLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = AppWorkflowStepLinks.from_dict(_links) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppWorkflowStepMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppWorkflowStepMetadata.from_dict(_metadata) + + name = d.pop("name", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + _policy_validation = d.pop("policy_validation", UNSET) + policy_validation: Union[Unset, AppWorkflowStepPolicyValidation] + if isinstance(_policy_validation, Unset): + policy_validation = UNSET + else: + policy_validation = AppWorkflowStepPolicyValidation.from_dict(_policy_validation) + + retried = d.pop("retried", UNSET) + + retryable = d.pop("retryable", UNSET) + + skippable = d.pop("skippable", UNSET) + + started_at = d.pop("started_at", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppCompositeStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppCompositeStatus.from_dict(_status) + + step_target_id = d.pop("step_target_id", UNSET) + + step_target_type = d.pop("step_target_type", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + workflow_id = d.pop("workflow_id", UNSET) + + app_workflow_step = cls( + approval=approval, + created_at=created_at, + created_by=created_by, + created_by_id=created_by_id, + execution_time=execution_time, + execution_type=execution_type, + finished=finished, + finished_at=finished_at, + group_idx=group_idx, + group_retry_idx=group_retry_idx, + id=id, + idx=idx, + install_workflow_id=install_workflow_id, + links=links, + metadata=metadata, + name=name, + owner_id=owner_id, + owner_type=owner_type, + policy_validation=policy_validation, + retried=retried, + retryable=retryable, + skippable=skippable, + started_at=started_at, + status=status, + step_target_id=step_target_id, + step_target_type=step_target_type, + updated_at=updated_at, + workflow_id=workflow_id, + ) + + app_workflow_step.additional_properties = d + return app_workflow_step + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_approval.py b/nuon/models/app_workflow_step_approval.py new file mode 100644 index 00000000..918a6009 --- /dev/null +++ b/nuon/models/app_workflow_step_approval.py @@ -0,0 +1,222 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_workflow_step_approval_type import AppWorkflowStepApprovalType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow_step import AppWorkflowStep + from ..models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse + + +T = TypeVar("T", bound="AppWorkflowStepApproval") + + +@_attrs_define +class AppWorkflowStepApproval: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_workflow_step (Union[Unset, AppWorkflowStep]): + install_workflow_step_id (Union[Unset, str]): the step that this approval belongs too + owner_id (Union[Unset, str]): + owner_type (Union[Unset, str]): + response (Union[Unset, AppWorkflowStepApprovalResponse]): + runner_job (Union[Unset, AppRunnerJob]): + runner_job_id (Union[Unset, str]): the runner job where this approval was created + type_ (Union[Unset, AppWorkflowStepApprovalType]): + updated_at (Union[Unset, str]): + workflow_step (Union[Unset, AppWorkflowStep]): + workflow_step_id (Union[Unset, str]): afterquery + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_workflow_step: Union[Unset, "AppWorkflowStep"] = UNSET + install_workflow_step_id: Union[Unset, str] = UNSET + owner_id: Union[Unset, str] = UNSET + owner_type: Union[Unset, str] = UNSET + response: Union[Unset, "AppWorkflowStepApprovalResponse"] = UNSET + runner_job: Union[Unset, "AppRunnerJob"] = UNSET + runner_job_id: Union[Unset, str] = UNSET + type_: Union[Unset, AppWorkflowStepApprovalType] = UNSET + updated_at: Union[Unset, str] = UNSET + workflow_step: Union[Unset, "AppWorkflowStep"] = UNSET + workflow_step_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_workflow_step: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_workflow_step, Unset): + install_workflow_step = self.install_workflow_step.to_dict() + + install_workflow_step_id = self.install_workflow_step_id + + owner_id = self.owner_id + + owner_type = self.owner_type + + response: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.response, Unset): + response = self.response.to_dict() + + runner_job: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_job, Unset): + runner_job = self.runner_job.to_dict() + + runner_job_id = self.runner_job_id + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + updated_at = self.updated_at + + workflow_step: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.workflow_step, Unset): + workflow_step = self.workflow_step.to_dict() + + workflow_step_id = self.workflow_step_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_workflow_step is not UNSET: + field_dict["installWorkflowStep"] = install_workflow_step + if install_workflow_step_id is not UNSET: + field_dict["installWorkflowStepID"] = install_workflow_step_id + if owner_id is not UNSET: + field_dict["owner_id"] = owner_id + if owner_type is not UNSET: + field_dict["owner_type"] = owner_type + if response is not UNSET: + field_dict["response"] = response + if runner_job is not UNSET: + field_dict["runner_job"] = runner_job + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if type_ is not UNSET: + field_dict["type"] = type_ + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if workflow_step is not UNSET: + field_dict["workflow_step"] = workflow_step + if workflow_step_id is not UNSET: + field_dict["workflow_step_id"] = workflow_step_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_job import AppRunnerJob + from ..models.app_workflow_step import AppWorkflowStep + from ..models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + _install_workflow_step = d.pop("installWorkflowStep", UNSET) + install_workflow_step: Union[Unset, AppWorkflowStep] + if isinstance(_install_workflow_step, Unset): + install_workflow_step = UNSET + else: + install_workflow_step = AppWorkflowStep.from_dict(_install_workflow_step) + + install_workflow_step_id = d.pop("installWorkflowStepID", UNSET) + + owner_id = d.pop("owner_id", UNSET) + + owner_type = d.pop("owner_type", UNSET) + + _response = d.pop("response", UNSET) + response: Union[Unset, AppWorkflowStepApprovalResponse] + if isinstance(_response, Unset): + response = UNSET + else: + response = AppWorkflowStepApprovalResponse.from_dict(_response) + + _runner_job = d.pop("runner_job", UNSET) + runner_job: Union[Unset, AppRunnerJob] + if isinstance(_runner_job, Unset): + runner_job = UNSET + else: + runner_job = AppRunnerJob.from_dict(_runner_job) + + runner_job_id = d.pop("runner_job_id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AppWorkflowStepApprovalType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AppWorkflowStepApprovalType(_type_) + + updated_at = d.pop("updated_at", UNSET) + + _workflow_step = d.pop("workflow_step", UNSET) + workflow_step: Union[Unset, AppWorkflowStep] + if isinstance(_workflow_step, Unset): + workflow_step = UNSET + else: + workflow_step = AppWorkflowStep.from_dict(_workflow_step) + + workflow_step_id = d.pop("workflow_step_id", UNSET) + + app_workflow_step_approval = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_workflow_step=install_workflow_step, + install_workflow_step_id=install_workflow_step_id, + owner_id=owner_id, + owner_type=owner_type, + response=response, + runner_job=runner_job, + runner_job_id=runner_job_id, + type_=type_, + updated_at=updated_at, + workflow_step=workflow_step, + workflow_step_id=workflow_step_id, + ) + + app_workflow_step_approval.additional_properties = d + return app_workflow_step_approval + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_approval_response.py b/nuon/models/app_workflow_step_approval_response.py new file mode 100644 index 00000000..65c19dae --- /dev/null +++ b/nuon/models/app_workflow_step_approval_response.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppWorkflowStepApprovalResponse") + + +@_attrs_define +class AppWorkflowStepApprovalResponse: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_workflow_step_approval_response = cls() + + app_workflow_step_approval_response.additional_properties = d + return app_workflow_step_approval_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_approval_type.py b/nuon/models/app_workflow_step_approval_type.py new file mode 100644 index 00000000..ad5e4d5f --- /dev/null +++ b/nuon/models/app_workflow_step_approval_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AppWorkflowStepApprovalType(str, Enum): + APPROVE_ALL = "approve-all" + HELM_APPROVAL = "helm_approval" + KUBERNETES_MANIFEST_APPROVAL = "kubernetes_manifest_approval" + NOOP = "noop" + TERRAFORM_PLAN = "terraform_plan" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_workflow_step_execution_type.py b/nuon/models/app_workflow_step_execution_type.py new file mode 100644 index 00000000..1b9cfe08 --- /dev/null +++ b/nuon/models/app_workflow_step_execution_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AppWorkflowStepExecutionType(str, Enum): + APPROVAL = "approval" + HIDDEN = "hidden" + SKIPPED = "skipped" + SYSTEM = "system" + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_workflow_step_links.py b/nuon/models/app_workflow_step_links.py new file mode 100644 index 00000000..83d1b937 --- /dev/null +++ b/nuon/models/app_workflow_step_links.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppWorkflowStepLinks") + + +@_attrs_define +class AppWorkflowStepLinks: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_workflow_step_links = cls() + + app_workflow_step_links.additional_properties = d + return app_workflow_step_links + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_metadata.py b/nuon/models/app_workflow_step_metadata.py new file mode 100644 index 00000000..4dcdf29d --- /dev/null +++ b/nuon/models/app_workflow_step_metadata.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppWorkflowStepMetadata") + + +@_attrs_define +class AppWorkflowStepMetadata: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_workflow_step_metadata = cls() + + app_workflow_step_metadata.additional_properties = d + return app_workflow_step_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_policy_validation.py b/nuon/models/app_workflow_step_policy_validation.py new file mode 100644 index 00000000..3f3fb12c --- /dev/null +++ b/nuon/models/app_workflow_step_policy_validation.py @@ -0,0 +1,136 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_composite_status import AppCompositeStatus + + +T = TypeVar("T", bound="AppWorkflowStepPolicyValidation") + + +@_attrs_define +class AppWorkflowStepPolicyValidation: + """ + Attributes: + created_at (Union[Unset, str]): + created_by_id (Union[Unset, str]): + id (Union[Unset, str]): + install_workflow_step_id (Union[Unset, str]): install workflow step is the install step that this was performed + within + response (Union[Unset, str]): response is the kyverno response + runner_job_id (Union[Unset, str]): runnerJobID is the runner job that this was performed within + status (Union[Unset, AppCompositeStatus]): + updated_at (Union[Unset, str]): + """ + + created_at: Union[Unset, str] = UNSET + created_by_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + install_workflow_step_id: Union[Unset, str] = UNSET + response: Union[Unset, str] = UNSET + runner_job_id: Union[Unset, str] = UNSET + status: Union[Unset, "AppCompositeStatus"] = UNSET + updated_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + created_by_id = self.created_by_id + + id = self.id + + install_workflow_step_id = self.install_workflow_step_id + + response = self.response + + runner_job_id = self.runner_job_id + + status: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if created_by_id is not UNSET: + field_dict["created_by_id"] = created_by_id + if id is not UNSET: + field_dict["id"] = id + if install_workflow_step_id is not UNSET: + field_dict["install_workflow_step_id"] = install_workflow_step_id + if response is not UNSET: + field_dict["response"] = response + if runner_job_id is not UNSET: + field_dict["runner_job_id"] = runner_job_id + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_composite_status import AppCompositeStatus + + d = dict(src_dict) + created_at = d.pop("created_at", UNSET) + + created_by_id = d.pop("created_by_id", UNSET) + + id = d.pop("id", UNSET) + + install_workflow_step_id = d.pop("install_workflow_step_id", UNSET) + + response = d.pop("response", UNSET) + + runner_job_id = d.pop("runner_job_id", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppCompositeStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppCompositeStatus.from_dict(_status) + + updated_at = d.pop("updated_at", UNSET) + + app_workflow_step_policy_validation = cls( + created_at=created_at, + created_by_id=created_by_id, + id=id, + install_workflow_step_id=install_workflow_step_id, + response=response, + runner_job_id=runner_job_id, + status=status, + updated_at=updated_at, + ) + + app_workflow_step_policy_validation.additional_properties = d + return app_workflow_step_policy_validation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/app_workflow_step_response_type.py b/nuon/models/app_workflow_step_response_type.py new file mode 100644 index 00000000..353c24d0 --- /dev/null +++ b/nuon/models/app_workflow_step_response_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class AppWorkflowStepResponseType(str, Enum): + APPROVE = "approve" + AUTO_APPROVE = "auto-approve" + DENY = "deny" + DENY_SKIP_CURRENT = "deny-skip-current" + DENY_SKIP_CURRENT_AND_DEPENDENTS = "deny-skip-current-and-dependents" + RETRY = "retry" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_workflow_type.py b/nuon/models/app_workflow_type.py new file mode 100644 index 00000000..3341f7a3 --- /dev/null +++ b/nuon/models/app_workflow_type.py @@ -0,0 +1,24 @@ +from enum import Enum + + +class AppWorkflowType(str, Enum): + ACTION_WORKFLOW_RUN = "action_workflow_run" + APP_BRANCHES_COMPONENT_REPO_UPDATE = "app_branches_component_repo_update" + APP_BRANCHES_CONFIG_REPO_UPDATE = "app_branches_config_repo_update" + APP_BRANCHES_MANUAL_UPDATE = "app_branches_manual_update" + DEPLOY_COMPONENTS = "deploy_components" + DEPROVISION = "deprovision" + DEPROVISION_SANDBOX = "deprovision_sandbox" + DRIFT_RUN = "drift_run" + DRIFT_RUN_REPROVISION_SANDBOX = "drift_run_reprovision_sandbox" + INPUT_UPDATE = "input_update" + MANUAL_DEPLOY = "manual_deploy" + PROVISION = "provision" + REPROVISION = "reprovision" + REPROVISION_SANDBOX = "reprovision_sandbox" + SYNC_SECRETS = "sync_secrets" + TEARDOWN_COMPONENT = "teardown_component" + TEARDOWN_COMPONENTS = "teardown_components" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/config_app_policy_type.py b/nuon/models/config_app_policy_type.py new file mode 100644 index 00000000..cd9151fd --- /dev/null +++ b/nuon/models/config_app_policy_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ConfigAppPolicyType(str, Enum): + KUBERNETES_CLUSTER = "kubernetes_cluster" + RUNNER_JOB_ACTION_WORKFLOW = "runner_job_action_workflow" + RUNNER_JOB_HELM_DEPLOY = "runner_job_helm_deploy" + RUNNER_JOB_TERRAFORM_DEPLOY = "runner_job_terraform_deploy" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/configs_oci_registry_auth.py b/nuon/models/configs_oci_registry_auth.py new file mode 100644 index 00000000..be062c3f --- /dev/null +++ b/nuon/models/configs_oci_registry_auth.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConfigsOCIRegistryAuth") + + +@_attrs_define +class ConfigsOCIRegistryAuth: + """ + Attributes: + password (Union[Unset, str]): + username (Union[Unset, str]): + """ + + password: Union[Unset, str] = UNSET + username: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + password = self.password + + username = self.username + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if password is not UNSET: + field_dict["password"] = password + if username is not UNSET: + field_dict["username"] = username + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + password = d.pop("password", UNSET) + + username = d.pop("username", UNSET) + + configs_oci_registry_auth = cls( + password=password, + username=username, + ) + + configs_oci_registry_auth.additional_properties = d + return configs_oci_registry_auth + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/configs_oci_registry_repository.py b/nuon/models/configs_oci_registry_repository.py new file mode 100644 index 00000000..83ecdfaa --- /dev/null +++ b/nuon/models/configs_oci_registry_repository.py @@ -0,0 +1,170 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.configs_oci_registry_type import ConfigsOCIRegistryType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_auth import ConfigsOCIRegistryAuth + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + + +T = TypeVar("T", bound="ConfigsOCIRegistryRepository") + + +@_attrs_define +class ConfigsOCIRegistryRepository: + """ + Attributes: + acrauth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + ecrauth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + login_server (Union[Unset, str]): + ociauth (Union[Unset, ConfigsOCIRegistryAuth]): + plugin (Union[Unset, str]): + region (Union[Unset, str]): + registry_type (Union[Unset, ConfigsOCIRegistryType]): + repository (Union[Unset, str]): based on the type of access, either the repository (ecr) or login server (acr) + will be provided. + """ + + acrauth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + ecrauth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + login_server: Union[Unset, str] = UNSET + ociauth: Union[Unset, "ConfigsOCIRegistryAuth"] = UNSET + plugin: Union[Unset, str] = UNSET + region: Union[Unset, str] = UNSET + registry_type: Union[Unset, ConfigsOCIRegistryType] = UNSET + repository: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + acrauth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.acrauth, Unset): + acrauth = self.acrauth.to_dict() + + ecrauth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.ecrauth, Unset): + ecrauth = self.ecrauth.to_dict() + + login_server = self.login_server + + ociauth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.ociauth, Unset): + ociauth = self.ociauth.to_dict() + + plugin = self.plugin + + region = self.region + + registry_type: Union[Unset, str] = UNSET + if not isinstance(self.registry_type, Unset): + registry_type = self.registry_type.value + + repository = self.repository + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if acrauth is not UNSET: + field_dict["acrauth"] = acrauth + if ecrauth is not UNSET: + field_dict["ecrauth"] = ecrauth + if login_server is not UNSET: + field_dict["loginServer"] = login_server + if ociauth is not UNSET: + field_dict["ociauth"] = ociauth + if plugin is not UNSET: + field_dict["plugin"] = plugin + if region is not UNSET: + field_dict["region"] = region + if registry_type is not UNSET: + field_dict["registryType"] = registry_type + if repository is not UNSET: + field_dict["repository"] = repository + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_auth import ConfigsOCIRegistryAuth + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + + d = dict(src_dict) + _acrauth = d.pop("acrauth", UNSET) + acrauth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_acrauth, Unset): + acrauth = UNSET + else: + acrauth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_acrauth) + + _ecrauth = d.pop("ecrauth", UNSET) + ecrauth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_ecrauth, Unset): + ecrauth = UNSET + else: + ecrauth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_ecrauth) + + login_server = d.pop("loginServer", UNSET) + + _ociauth = d.pop("ociauth", UNSET) + ociauth: Union[Unset, ConfigsOCIRegistryAuth] + if isinstance(_ociauth, Unset): + ociauth = UNSET + else: + ociauth = ConfigsOCIRegistryAuth.from_dict(_ociauth) + + plugin = d.pop("plugin", UNSET) + + region = d.pop("region", UNSET) + + _registry_type = d.pop("registryType", UNSET) + registry_type: Union[Unset, ConfigsOCIRegistryType] + if isinstance(_registry_type, Unset): + registry_type = UNSET + else: + registry_type = ConfigsOCIRegistryType(_registry_type) + + repository = d.pop("repository", UNSET) + + configs_oci_registry_repository = cls( + acrauth=acrauth, + ecrauth=ecrauth, + login_server=login_server, + ociauth=ociauth, + plugin=plugin, + region=region, + registry_type=registry_type, + repository=repository, + ) + + configs_oci_registry_repository.additional_properties = d + return configs_oci_registry_repository + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/configs_oci_registry_type.py b/nuon/models/configs_oci_registry_type.py new file mode 100644 index 00000000..734dceca --- /dev/null +++ b/nuon/models/configs_oci_registry_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ConfigsOCIRegistryType(str, Enum): + ACR = "acr" + ECR = "ecr" + PRIVATE_OCI = "private_oci" + PUBLIC_OCI = "public_oci" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/credentials_assume_role_config.py b/nuon/models/credentials_assume_role_config.py new file mode 100644 index 00000000..9c6811c1 --- /dev/null +++ b/nuon/models/credentials_assume_role_config.py @@ -0,0 +1,109 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.iam_two_step_config import IamTwoStepConfig + + +T = TypeVar("T", bound="CredentialsAssumeRoleConfig") + + +@_attrs_define +class CredentialsAssumeRoleConfig: + """ + Attributes: + role_arn (str): + session_name (str): + session_duration_seconds (Union[Unset, int]): + two_step_config (Union[Unset, IamTwoStepConfig]): + use_github_oidc (Union[Unset, bool]): + """ + + role_arn: str + session_name: str + session_duration_seconds: Union[Unset, int] = UNSET + two_step_config: Union[Unset, "IamTwoStepConfig"] = UNSET + use_github_oidc: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + role_arn = self.role_arn + + session_name = self.session_name + + session_duration_seconds = self.session_duration_seconds + + two_step_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.two_step_config, Unset): + two_step_config = self.two_step_config.to_dict() + + use_github_oidc = self.use_github_oidc + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "role_arn": role_arn, + "session_name": session_name, + } + ) + if session_duration_seconds is not UNSET: + field_dict["session_duration_seconds"] = session_duration_seconds + if two_step_config is not UNSET: + field_dict["two_step_config"] = two_step_config + if use_github_oidc is not UNSET: + field_dict["use_github_oidc"] = use_github_oidc + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.iam_two_step_config import IamTwoStepConfig + + d = dict(src_dict) + role_arn = d.pop("role_arn") + + session_name = d.pop("session_name") + + session_duration_seconds = d.pop("session_duration_seconds", UNSET) + + _two_step_config = d.pop("two_step_config", UNSET) + two_step_config: Union[Unset, IamTwoStepConfig] + if isinstance(_two_step_config, Unset): + two_step_config = UNSET + else: + two_step_config = IamTwoStepConfig.from_dict(_two_step_config) + + use_github_oidc = d.pop("use_github_oidc", UNSET) + + credentials_assume_role_config = cls( + role_arn=role_arn, + session_name=session_name, + session_duration_seconds=session_duration_seconds, + two_step_config=two_step_config, + use_github_oidc=use_github_oidc, + ) + + credentials_assume_role_config.additional_properties = d + return credentials_assume_role_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/credentials_service_principal_credentials.py b/nuon/models/credentials_service_principal_credentials.py new file mode 100644 index 00000000..3c3fd83c --- /dev/null +++ b/nuon/models/credentials_service_principal_credentials.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CredentialsServicePrincipalCredentials") + + +@_attrs_define +class CredentialsServicePrincipalCredentials: + """ + Attributes: + subscription_id (Union[Unset, str]): + subscription_tenant_id (Union[Unset, str]): + """ + + subscription_id: Union[Unset, str] = UNSET + subscription_tenant_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + subscription_id = self.subscription_id + + subscription_tenant_id = self.subscription_tenant_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if subscription_id is not UNSET: + field_dict["subscription_id"] = subscription_id + if subscription_tenant_id is not UNSET: + field_dict["subscription_tenant_id"] = subscription_tenant_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + subscription_id = d.pop("subscription_id", UNSET) + + subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) + + credentials_service_principal_credentials = cls( + subscription_id=subscription_id, + subscription_tenant_id=subscription_tenant_id, + ) + + credentials_service_principal_credentials.additional_properties = d + return credentials_service_principal_credentials + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/credentials_static_credentials.py b/nuon/models/credentials_static_credentials.py new file mode 100644 index 00000000..0c5adb73 --- /dev/null +++ b/nuon/models/credentials_static_credentials.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CredentialsStaticCredentials") + + +@_attrs_define +class CredentialsStaticCredentials: + """ + Attributes: + access_key_id (str): + secret_access_key (str): + session_token (str): + """ + + access_key_id: str + secret_access_key: str + session_token: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + access_key_id = self.access_key_id + + secret_access_key = self.secret_access_key + + session_token = self.session_token + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_key_id": access_key_id, + "secret_access_key": secret_access_key, + "session_token": session_token, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + access_key_id = d.pop("access_key_id") + + secret_access_key = d.pop("secret_access_key") + + session_token = d.pop("session_token") + + credentials_static_credentials = cls( + access_key_id=access_key_id, + secret_access_key=secret_access_key, + session_token=session_token, + ) + + credentials_static_credentials.additional_properties = d + return credentials_static_credentials + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/generics_null_time.py b/nuon/models/generics_null_time.py new file mode 100644 index 00000000..8e567168 --- /dev/null +++ b/nuon/models/generics_null_time.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GenericsNullTime") + + +@_attrs_define +class GenericsNullTime: + """ + Attributes: + time (Union[Unset, str]): + valid (Union[Unset, bool]): Valid is true if Time is not NULL + """ + + time: Union[Unset, str] = UNSET + valid: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + time = self.time + + valid = self.valid + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if time is not UNSET: + field_dict["time"] = time + if valid is not UNSET: + field_dict["valid"] = valid + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + time = d.pop("time", UNSET) + + valid = d.pop("valid", UNSET) + + generics_null_time = cls( + time=time, + valid=valid, + ) + + generics_null_time.additional_properties = d + return generics_null_time + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/get_app_config_template_type.py b/nuon/models/get_app_config_template_type.py new file mode 100644 index 00000000..bee18843 --- /dev/null +++ b/nuon/models/get_app_config_template_type.py @@ -0,0 +1,25 @@ +from enum import Enum + + +class GetAppConfigTemplateType(str, Enum): + AWS_ECS = "aws-ecs" + AWS_ECS_BYOVPC = "aws-ecs-byovpc" + AWS_EKS = "aws-eks" + AWS_EKS_BYOVPC = "aws-eks-byovpc" + AZURE_AKS = "azure-aks" + CONTAINER_IMAGE = "container-image" + DOCKER_BUILD = "docker-build" + ECR_CONTAINER_IMAGE = "ecr-container-image" + FLAT = "flat" + HELM = "helm" + INPUTS = "inputs" + INSTALLER = "installer" + JOB = "job" + RUNNER = "runner" + SANDBOX = "sandbox" + TERRAFORM = "terraform" + TERRAFORMINFRA = "terraformInfra" + TOP_LEVEL = "top-level" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/get_config_schema_response_200.py b/nuon/models/get_config_schema_response_200.py new file mode 100644 index 00000000..2f9e583a --- /dev/null +++ b/nuon/models/get_config_schema_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetConfigSchemaResponse200") + + +@_attrs_define +class GetConfigSchemaResponse200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_config_schema_response_200 = cls() + + get_config_schema_response_200.additional_properties = d + return get_config_schema_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/nuon/models/get_install_component_outputs_response_200.py b/nuon/models/get_install_component_outputs_response_200.py new file mode 100644 index 00000000..26fa97b9 --- /dev/null +++ b/nuon/models/get_install_component_outputs_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetInstallComponentOutputsResponse200") + + +@_attrs_define +class GetInstallComponentOutputsResponse200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_install_component_outputs_response_200 = cls() + + get_install_component_outputs_response_200.additional_properties = d + return get_install_component_outputs_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/nuon/models/get_terraform_workspace_state_json_resources_response_200.py b/nuon/models/get_terraform_workspace_state_json_resources_response_200.py new file mode 100644 index 00000000..c329e0ea --- /dev/null +++ b/nuon/models/get_terraform_workspace_state_json_resources_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetTerraformWorkspaceStateJSONResourcesResponse200") + + +@_attrs_define +class GetTerraformWorkspaceStateJSONResourcesResponse200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_terraform_workspace_state_json_resources_response_200 = cls() + + get_terraform_workspace_state_json_resources_response_200.additional_properties = d + return get_terraform_workspace_state_json_resources_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/nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py b/nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py new file mode 100644 index 00000000..4a5daed2 --- /dev/null +++ b/nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetTerraformWorkspaceStateJSONResourcesV2Response200") + + +@_attrs_define +class GetTerraformWorkspaceStateJSONResourcesV2Response200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_terraform_workspace_state_json_resources_v2_response_200 = cls() + + get_terraform_workspace_state_json_resources_v2_response_200.additional_properties = d + return get_terraform_workspace_state_json_resources_v2_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/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py b/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py new file mode 100644 index 00000000..8e4b3e12 --- /dev/null +++ b/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetTerraformWorkspaceStatesJSONByIDResponse200") + + +@_attrs_define +class GetTerraformWorkspaceStatesJSONByIDResponse200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_terraform_workspace_states_json_by_id_response_200 = cls() + + get_terraform_workspace_states_json_by_id_response_200.additional_properties = d + return get_terraform_workspace_states_json_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/nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py b/nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py new file mode 100644 index 00000000..b608aa4e --- /dev/null +++ b/nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetTerraformWorkspaceStatesJSONByIDV2Response200") + + +@_attrs_define +class GetTerraformWorkspaceStatesJSONByIDV2Response200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_terraform_workspace_states_json_by_idv2_response_200 = cls() + + get_terraform_workspace_states_json_by_idv2_response_200.additional_properties = d + return get_terraform_workspace_states_json_by_idv2_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/nuon/models/get_workflow_step_approval_contents_response_200.py b/nuon/models/get_workflow_step_approval_contents_response_200.py new file mode 100644 index 00000000..d4c2ab56 --- /dev/null +++ b/nuon/models/get_workflow_step_approval_contents_response_200.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetWorkflowStepApprovalContentsResponse200") + + +@_attrs_define +class GetWorkflowStepApprovalContentsResponse200: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_workflow_step_approval_contents_response_200 = cls() + + get_workflow_step_approval_contents_response_200.additional_properties = d + return get_workflow_step_approval_contents_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/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py b/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py new file mode 100644 index 00000000..cec7dcf7 --- /dev/null +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py @@ -0,0 +1,127 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.credentials_assume_role_config import CredentialsAssumeRoleConfig + from ..models.credentials_static_credentials import CredentialsStaticCredentials + + +T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgAwsCredentialsConfig") + + +@_attrs_define +class GithubComPowertoolsdevMonoPkgAwsCredentialsConfig: + """ + Attributes: + assume_role (Union[Unset, CredentialsAssumeRoleConfig]): + cache_id (Union[Unset, str]): when cache ID is set, these credentials will be reused, up to the duration of the + sessionTimeout (or default) + profile (Union[Unset, str]): If profile is provided, we'll use that profile over the default credentials + region (Union[Unset, str]): + static (Union[Unset, CredentialsStaticCredentials]): + use_default (Union[Unset, bool]): + """ + + assume_role: Union[Unset, "CredentialsAssumeRoleConfig"] = UNSET + cache_id: Union[Unset, str] = UNSET + profile: Union[Unset, str] = UNSET + region: Union[Unset, str] = UNSET + static: Union[Unset, "CredentialsStaticCredentials"] = UNSET + use_default: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + assume_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.assume_role, Unset): + assume_role = self.assume_role.to_dict() + + cache_id = self.cache_id + + profile = self.profile + + region = self.region + + static: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.static, Unset): + static = self.static.to_dict() + + use_default = self.use_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if assume_role is not UNSET: + field_dict["assume_role"] = assume_role + if cache_id is not UNSET: + field_dict["cache_id"] = cache_id + if profile is not UNSET: + field_dict["profile"] = profile + if region is not UNSET: + field_dict["region"] = region + if static is not UNSET: + field_dict["static"] = static + if use_default is not UNSET: + field_dict["use_default"] = use_default + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.credentials_assume_role_config import CredentialsAssumeRoleConfig + from ..models.credentials_static_credentials import CredentialsStaticCredentials + + d = dict(src_dict) + _assume_role = d.pop("assume_role", UNSET) + assume_role: Union[Unset, CredentialsAssumeRoleConfig] + if isinstance(_assume_role, Unset): + assume_role = UNSET + else: + assume_role = CredentialsAssumeRoleConfig.from_dict(_assume_role) + + cache_id = d.pop("cache_id", UNSET) + + profile = d.pop("profile", UNSET) + + region = d.pop("region", UNSET) + + _static = d.pop("static", UNSET) + static: Union[Unset, CredentialsStaticCredentials] + if isinstance(_static, Unset): + static = UNSET + else: + static = CredentialsStaticCredentials.from_dict(_static) + + use_default = d.pop("use_default", UNSET) + + github_com_powertoolsdev_mono_pkg_aws_credentials_config = cls( + assume_role=assume_role, + cache_id=cache_id, + profile=profile, + region=region, + static=static, + use_default=use_default, + ) + + github_com_powertoolsdev_mono_pkg_aws_credentials_config.additional_properties = d + return github_com_powertoolsdev_mono_pkg_aws_credentials_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py b/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py new file mode 100644 index 00000000..7613fb9c --- /dev/null +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.credentials_service_principal_credentials import CredentialsServicePrincipalCredentials + + +T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgAzureCredentialsConfig") + + +@_attrs_define +class GithubComPowertoolsdevMonoPkgAzureCredentialsConfig: + """ + Attributes: + service_principal (Union[Unset, CredentialsServicePrincipalCredentials]): + use_default (Union[Unset, bool]): + """ + + service_principal: Union[Unset, "CredentialsServicePrincipalCredentials"] = UNSET + use_default: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + service_principal: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.service_principal, Unset): + service_principal = self.service_principal.to_dict() + + use_default = self.use_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if service_principal is not UNSET: + field_dict["service_principal"] = service_principal + if use_default is not UNSET: + field_dict["use_default"] = use_default + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.credentials_service_principal_credentials import CredentialsServicePrincipalCredentials + + d = dict(src_dict) + _service_principal = d.pop("service_principal", UNSET) + service_principal: Union[Unset, CredentialsServicePrincipalCredentials] + if isinstance(_service_principal, Unset): + service_principal = UNSET + else: + service_principal = CredentialsServicePrincipalCredentials.from_dict(_service_principal) + + use_default = d.pop("use_default", UNSET) + + github_com_powertoolsdev_mono_pkg_azure_credentials_config = cls( + service_principal=service_principal, + use_default=use_default, + ) + + github_com_powertoolsdev_mono_pkg_azure_credentials_config.additional_properties = d + return github_com_powertoolsdev_mono_pkg_azure_credentials_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py new file mode 100644 index 00000000..dd0f5dc7 --- /dev/null +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py @@ -0,0 +1,301 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state_components import ( + GithubComPowertoolsdevMonoPkgTypesStateStateComponents, + ) + from ..models.state_actions_state import StateActionsState + from ..models.state_app_state import StateAppState + from ..models.state_cloud_account import StateCloudAccount + from ..models.state_domain_state import StateDomainState + from ..models.state_inputs_state import StateInputsState + from ..models.state_install_stack_state import StateInstallStackState + from ..models.state_install_state import StateInstallState + from ..models.state_org_state import StateOrgState + from ..models.state_runner_state import StateRunnerState + from ..models.state_sandbox_state import StateSandboxState + from ..models.state_secrets_state import StateSecretsState + + +T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgTypesStateState") + + +@_attrs_define +class GithubComPowertoolsdevMonoPkgTypesStateState: + """ + Attributes: + actions (Union[Unset, StateActionsState]): + app (Union[Unset, StateAppState]): + cloud_account (Union[Unset, StateCloudAccount]): + components (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateStateComponents]): + domain (Union[Unset, StateDomainState]): + id (Union[Unset, str]): + inputs (Union[Unset, StateInputsState]): + install (Union[Unset, StateInstallState]): + install_stack (Union[Unset, StateInstallStackState]): + name (Union[Unset, str]): + org (Union[Unset, StateOrgState]): + runner (Union[Unset, StateRunnerState]): + sandbox (Union[Unset, StateSandboxState]): + secrets (Union[Unset, StateSecretsState]): + stale_at (Union[Unset, str]): loaded from the database but not part of the state itself + """ + + actions: Union[Unset, "StateActionsState"] = UNSET + app: Union[Unset, "StateAppState"] = UNSET + cloud_account: Union[Unset, "StateCloudAccount"] = UNSET + components: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateStateComponents"] = UNSET + domain: Union[Unset, "StateDomainState"] = UNSET + id: Union[Unset, str] = UNSET + inputs: Union[Unset, "StateInputsState"] = UNSET + install: Union[Unset, "StateInstallState"] = UNSET + install_stack: Union[Unset, "StateInstallStackState"] = UNSET + name: Union[Unset, str] = UNSET + org: Union[Unset, "StateOrgState"] = UNSET + runner: Union[Unset, "StateRunnerState"] = UNSET + sandbox: Union[Unset, "StateSandboxState"] = UNSET + secrets: Union[Unset, "StateSecretsState"] = UNSET + stale_at: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + actions: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.actions, Unset): + actions = self.actions.to_dict() + + app: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.app, Unset): + app = self.app.to_dict() + + cloud_account: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cloud_account, Unset): + cloud_account = self.cloud_account.to_dict() + + components: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.components, Unset): + components = self.components.to_dict() + + domain: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.domain, Unset): + domain = self.domain.to_dict() + + id = self.id + + inputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.inputs, Unset): + inputs = self.inputs.to_dict() + + install: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install, Unset): + install = self.install.to_dict() + + install_stack: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_stack, Unset): + install_stack = self.install_stack.to_dict() + + name = self.name + + org: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.org, Unset): + org = self.org.to_dict() + + runner: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner, Unset): + runner = self.runner.to_dict() + + sandbox: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox, Unset): + sandbox = self.sandbox.to_dict() + + secrets: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.secrets, Unset): + secrets = self.secrets.to_dict() + + stale_at = self.stale_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actions is not UNSET: + field_dict["actions"] = actions + if app is not UNSET: + field_dict["app"] = app + if cloud_account is not UNSET: + field_dict["cloud_account"] = cloud_account + if components is not UNSET: + field_dict["components"] = components + if domain is not UNSET: + field_dict["domain"] = domain + if id is not UNSET: + field_dict["id"] = id + if inputs is not UNSET: + field_dict["inputs"] = inputs + if install is not UNSET: + field_dict["install"] = install + if install_stack is not UNSET: + field_dict["install_stack"] = install_stack + if name is not UNSET: + field_dict["name"] = name + if org is not UNSET: + field_dict["org"] = org + if runner is not UNSET: + field_dict["runner"] = runner + if sandbox is not UNSET: + field_dict["sandbox"] = sandbox + if secrets is not UNSET: + field_dict["secrets"] = secrets + if stale_at is not UNSET: + field_dict["stale_at"] = stale_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state_components import ( + GithubComPowertoolsdevMonoPkgTypesStateStateComponents, + ) + from ..models.state_actions_state import StateActionsState + from ..models.state_app_state import StateAppState + from ..models.state_cloud_account import StateCloudAccount + from ..models.state_domain_state import StateDomainState + from ..models.state_inputs_state import StateInputsState + from ..models.state_install_stack_state import StateInstallStackState + from ..models.state_install_state import StateInstallState + from ..models.state_org_state import StateOrgState + from ..models.state_runner_state import StateRunnerState + from ..models.state_sandbox_state import StateSandboxState + from ..models.state_secrets_state import StateSecretsState + + d = dict(src_dict) + _actions = d.pop("actions", UNSET) + actions: Union[Unset, StateActionsState] + if isinstance(_actions, Unset): + actions = UNSET + else: + actions = StateActionsState.from_dict(_actions) + + _app = d.pop("app", UNSET) + app: Union[Unset, StateAppState] + if isinstance(_app, Unset): + app = UNSET + else: + app = StateAppState.from_dict(_app) + + _cloud_account = d.pop("cloud_account", UNSET) + cloud_account: Union[Unset, StateCloudAccount] + if isinstance(_cloud_account, Unset): + cloud_account = UNSET + else: + cloud_account = StateCloudAccount.from_dict(_cloud_account) + + _components = d.pop("components", UNSET) + components: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateStateComponents] + if isinstance(_components, Unset): + components = UNSET + else: + components = GithubComPowertoolsdevMonoPkgTypesStateStateComponents.from_dict(_components) + + _domain = d.pop("domain", UNSET) + domain: Union[Unset, StateDomainState] + if isinstance(_domain, Unset): + domain = UNSET + else: + domain = StateDomainState.from_dict(_domain) + + id = d.pop("id", UNSET) + + _inputs = d.pop("inputs", UNSET) + inputs: Union[Unset, StateInputsState] + if isinstance(_inputs, Unset): + inputs = UNSET + else: + inputs = StateInputsState.from_dict(_inputs) + + _install = d.pop("install", UNSET) + install: Union[Unset, StateInstallState] + if isinstance(_install, Unset): + install = UNSET + else: + install = StateInstallState.from_dict(_install) + + _install_stack = d.pop("install_stack", UNSET) + install_stack: Union[Unset, StateInstallStackState] + if isinstance(_install_stack, Unset): + install_stack = UNSET + else: + install_stack = StateInstallStackState.from_dict(_install_stack) + + name = d.pop("name", UNSET) + + _org = d.pop("org", UNSET) + org: Union[Unset, StateOrgState] + if isinstance(_org, Unset): + org = UNSET + else: + org = StateOrgState.from_dict(_org) + + _runner = d.pop("runner", UNSET) + runner: Union[Unset, StateRunnerState] + if isinstance(_runner, Unset): + runner = UNSET + else: + runner = StateRunnerState.from_dict(_runner) + + _sandbox = d.pop("sandbox", UNSET) + sandbox: Union[Unset, StateSandboxState] + if isinstance(_sandbox, Unset): + sandbox = UNSET + else: + sandbox = StateSandboxState.from_dict(_sandbox) + + _secrets = d.pop("secrets", UNSET) + secrets: Union[Unset, StateSecretsState] + if isinstance(_secrets, Unset): + secrets = UNSET + else: + secrets = StateSecretsState.from_dict(_secrets) + + stale_at = d.pop("stale_at", UNSET) + + github_com_powertoolsdev_mono_pkg_types_state_state = cls( + actions=actions, + app=app, + cloud_account=cloud_account, + components=components, + domain=domain, + id=id, + inputs=inputs, + install=install, + install_stack=install_stack, + name=name, + org=org, + runner=runner, + sandbox=sandbox, + secrets=secrets, + stale_at=stale_at, + ) + + github_com_powertoolsdev_mono_pkg_types_state_state.additional_properties = d + return github_com_powertoolsdev_mono_pkg_types_state_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py new file mode 100644 index 00000000..92cef8c6 --- /dev/null +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgTypesStateStateComponents") + + +@_attrs_define +class GithubComPowertoolsdevMonoPkgTypesStateStateComponents: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + github_com_powertoolsdev_mono_pkg_types_state_state_components = cls() + + github_com_powertoolsdev_mono_pkg_types_state_state_components.additional_properties = d + return github_com_powertoolsdev_mono_pkg_types_state_state_components + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/helpers_create_install_config_params.py b/nuon/models/helpers_create_install_config_params.py new file mode 100644 index 00000000..90c00ca2 --- /dev/null +++ b/nuon/models/helpers_create_install_config_params.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HelpersCreateInstallConfigParams") + + +@_attrs_define +class HelpersCreateInstallConfigParams: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + helpers_create_install_config_params = cls( + approval_option=approval_option, + ) + + helpers_create_install_config_params.additional_properties = d + return helpers_create_install_config_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/helpers_install_metadata.py b/nuon/models/helpers_install_metadata.py new file mode 100644 index 00000000..7a4c6607 --- /dev/null +++ b/nuon/models/helpers_install_metadata.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HelpersInstallMetadata") + + +@_attrs_define +class HelpersInstallMetadata: + """ + Attributes: + managed_by (Union[Unset, str]): + """ + + managed_by: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + managed_by = self.managed_by + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = d.pop("managed_by", UNSET) + + helpers_install_metadata = cls( + managed_by=managed_by, + ) + + helpers_install_metadata.additional_properties = d + return helpers_install_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/nuon/models/iam_static_credentials.py b/nuon/models/iam_static_credentials.py new file mode 100644 index 00000000..1359315b --- /dev/null +++ b/nuon/models/iam_static_credentials.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IamStaticCredentials") + + +@_attrs_define +class IamStaticCredentials: + """ + Attributes: + access_key_id (Union[Unset, str]): + secret_access_key (Union[Unset, str]): + session_token (Union[Unset, str]): + """ + + access_key_id: Union[Unset, str] = UNSET + secret_access_key: Union[Unset, str] = UNSET + session_token: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + access_key_id = self.access_key_id + + secret_access_key = self.secret_access_key + + session_token = self.session_token + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if access_key_id is not UNSET: + field_dict["access_key_id"] = access_key_id + if secret_access_key is not UNSET: + field_dict["secret_access_key"] = secret_access_key + if session_token is not UNSET: + field_dict["session_token"] = session_token + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + access_key_id = d.pop("access_key_id", UNSET) + + secret_access_key = d.pop("secret_access_key", UNSET) + + session_token = d.pop("session_token", UNSET) + + iam_static_credentials = cls( + access_key_id=access_key_id, + secret_access_key=secret_access_key, + session_token=session_token, + ) + + iam_static_credentials.additional_properties = d + return iam_static_credentials + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/iam_two_step_config.py b/nuon/models/iam_two_step_config.py new file mode 100644 index 00000000..500e26fc --- /dev/null +++ b/nuon/models/iam_two_step_config.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.iam_static_credentials import IamStaticCredentials + + +T = TypeVar("T", bound="IamTwoStepConfig") + + +@_attrs_define +class IamTwoStepConfig: + """ + Attributes: + iam_role_arn (Union[Unset, str]): + src_iam_role_arn (Union[Unset, str]): + src_static_credentials (Union[Unset, IamStaticCredentials]): + """ + + iam_role_arn: Union[Unset, str] = UNSET + src_iam_role_arn: Union[Unset, str] = UNSET + src_static_credentials: Union[Unset, "IamStaticCredentials"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + iam_role_arn = self.iam_role_arn + + src_iam_role_arn = self.src_iam_role_arn + + src_static_credentials: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.src_static_credentials, Unset): + src_static_credentials = self.src_static_credentials.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if iam_role_arn is not UNSET: + field_dict["iam_role_arn"] = iam_role_arn + if src_iam_role_arn is not UNSET: + field_dict["src_iam_role_arn"] = src_iam_role_arn + if src_static_credentials is not UNSET: + field_dict["src_static_credentials"] = src_static_credentials + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.iam_static_credentials import IamStaticCredentials + + d = dict(src_dict) + iam_role_arn = d.pop("iam_role_arn", UNSET) + + src_iam_role_arn = d.pop("src_iam_role_arn", UNSET) + + _src_static_credentials = d.pop("src_static_credentials", UNSET) + src_static_credentials: Union[Unset, IamStaticCredentials] + if isinstance(_src_static_credentials, Unset): + src_static_credentials = UNSET + else: + src_static_credentials = IamStaticCredentials.from_dict(_src_static_credentials) + + iam_two_step_config = cls( + iam_role_arn=iam_role_arn, + src_iam_role_arn=src_iam_role_arn, + src_static_credentials=src_static_credentials, + ) + + iam_two_step_config.additional_properties = d + return iam_two_step_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/kube_cluster_info.py b/nuon/models/kube_cluster_info.py new file mode 100644 index 00000000..dbd3e7c0 --- /dev/null +++ b/nuon/models/kube_cluster_info.py @@ -0,0 +1,174 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info_env_vars import KubeClusterInfoEnvVars + + +T = TypeVar("T", bound="KubeClusterInfo") + + +@_attrs_define +class KubeClusterInfo: + """ + Attributes: + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + ca_data (Union[Unset, str]): CAData is the base64 encoded public certificate + endpoint (Union[Unset, str]): Endpoint is the URL of the k8s api server + env_vars (Union[Unset, KubeClusterInfoEnvVars]): + id (Union[Unset, str]): ID is the ID of the EKS cluster + inline (Union[Unset, bool]): If this is set, we will _not_ use aws-iam-authenticator, but rather inline create + the token + kube_config (Union[Unset, str]): KubeConfig will override the kube config, and be parsed instead of generating a + new one + trusted_role_arn (Union[Unset, str]): TrustedRoleARN is the arn of the role that should be assumed to interact + with the cluster + NOTE(JM): we are deprecating this + """ + + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + ca_data: Union[Unset, str] = UNSET + endpoint: Union[Unset, str] = UNSET + env_vars: Union[Unset, "KubeClusterInfoEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + inline: Union[Unset, bool] = UNSET + kube_config: Union[Unset, str] = UNSET + trusted_role_arn: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + ca_data = self.ca_data + + endpoint = self.endpoint + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + inline = self.inline + + kube_config = self.kube_config + + trusted_role_arn = self.trusted_role_arn + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if ca_data is not UNSET: + field_dict["ca_data"] = ca_data + if endpoint is not UNSET: + field_dict["endpoint"] = endpoint + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if inline is not UNSET: + field_dict["inline"] = inline + if kube_config is not UNSET: + field_dict["kube_config"] = kube_config + if trusted_role_arn is not UNSET: + field_dict["trusted_role_arn"] = trusted_role_arn + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info_env_vars import KubeClusterInfoEnvVars + + d = dict(src_dict) + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + ca_data = d.pop("ca_data", UNSET) + + endpoint = d.pop("endpoint", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, KubeClusterInfoEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = KubeClusterInfoEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + inline = d.pop("inline", UNSET) + + kube_config = d.pop("kube_config", UNSET) + + trusted_role_arn = d.pop("trusted_role_arn", UNSET) + + kube_cluster_info = cls( + aws_auth=aws_auth, + azure_auth=azure_auth, + ca_data=ca_data, + endpoint=endpoint, + env_vars=env_vars, + id=id, + inline=inline, + kube_config=kube_config, + trusted_role_arn=trusted_role_arn, + ) + + kube_cluster_info.additional_properties = d + return kube_cluster_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/nuon/models/kube_cluster_info_env_vars.py b/nuon/models/kube_cluster_info_env_vars.py new file mode 100644 index 00000000..4f60a974 --- /dev/null +++ b/nuon/models/kube_cluster_info_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="KubeClusterInfoEnvVars") + + +@_attrs_define +class KubeClusterInfoEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + kube_cluster_info_env_vars = cls() + + kube_cluster_info_env_vars.additional_properties = d + return kube_cluster_info_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/lock_terraform_workspace_body.py b/nuon/models/lock_terraform_workspace_body.py new file mode 100644 index 00000000..06826d10 --- /dev/null +++ b/nuon/models/lock_terraform_workspace_body.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LockTerraformWorkspaceBody") + + +@_attrs_define +class LockTerraformWorkspaceBody: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + lock_terraform_workspace_body = cls() + + lock_terraform_workspace_body.additional_properties = d + return lock_terraform_workspace_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/nuon/models/outputs_secret_sync_output.py b/nuon/models/outputs_secret_sync_output.py new file mode 100644 index 00000000..0cfdb524 --- /dev/null +++ b/nuon/models/outputs_secret_sync_output.py @@ -0,0 +1,122 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OutputsSecretSyncOutput") + + +@_attrs_define +class OutputsSecretSyncOutput: + """ + Attributes: + arn (Union[Unset, str]): + exists (Union[Unset, bool]): + kubernetes_key (Union[Unset, str]): + kubernetes_name (Union[Unset, str]): + kubernetes_namespace (Union[Unset, str]): + length (Union[Unset, int]): + name (Union[Unset, str]): + timestamp (Union[Unset, str]): + """ + + arn: Union[Unset, str] = UNSET + exists: Union[Unset, bool] = UNSET + kubernetes_key: Union[Unset, str] = UNSET + kubernetes_name: Union[Unset, str] = UNSET + kubernetes_namespace: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + timestamp: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + arn = self.arn + + exists = self.exists + + kubernetes_key = self.kubernetes_key + + kubernetes_name = self.kubernetes_name + + kubernetes_namespace = self.kubernetes_namespace + + length = self.length + + name = self.name + + timestamp = self.timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if arn is not UNSET: + field_dict["arn"] = arn + if exists is not UNSET: + field_dict["exists"] = exists + if kubernetes_key is not UNSET: + field_dict["kubernetes_key"] = kubernetes_key + if kubernetes_name is not UNSET: + field_dict["kubernetes_name"] = kubernetes_name + if kubernetes_namespace is not UNSET: + field_dict["kubernetes_namespace"] = kubernetes_namespace + if length is not UNSET: + field_dict["length"] = length + if name is not UNSET: + field_dict["name"] = name + if timestamp is not UNSET: + field_dict["timestamp"] = timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + arn = d.pop("arn", UNSET) + + exists = d.pop("exists", UNSET) + + kubernetes_key = d.pop("kubernetes_key", UNSET) + + kubernetes_name = d.pop("kubernetes_name", UNSET) + + kubernetes_namespace = d.pop("kubernetes_namespace", UNSET) + + length = d.pop("length", UNSET) + + name = d.pop("name", UNSET) + + timestamp = d.pop("timestamp", UNSET) + + outputs_secret_sync_output = cls( + arn=arn, + exists=exists, + kubernetes_key=kubernetes_key, + kubernetes_name=kubernetes_name, + kubernetes_namespace=kubernetes_namespace, + length=length, + name=name, + timestamp=timestamp, + ) + + outputs_secret_sync_output.additional_properties = d + return outputs_secret_sync_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/permissions_permission.py b/nuon/models/permissions_permission.py new file mode 100644 index 00000000..bf02f591 --- /dev/null +++ b/nuon/models/permissions_permission.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class PermissionsPermission(str, Enum): + ALL = "all" + CREATE = "create" + DELETE = "delete" + READ = "read" + UNKNOWN = "unknown" + UPDATE = "update" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/permissions_set.py b/nuon/models/permissions_set.py new file mode 100644 index 00000000..d8db396a --- /dev/null +++ b/nuon/models/permissions_set.py @@ -0,0 +1,53 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.permissions_permission import PermissionsPermission + +T = TypeVar("T", bound="PermissionsSet") + + +@_attrs_define +class PermissionsSet: + """ """ + + additional_properties: dict[str, PermissionsPermission] = _attrs_field(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(): + field_dict[prop_name] = prop.value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + permissions_set = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = PermissionsPermission(prop_dict) + + additional_properties[prop_name] = additional_property + + permissions_set.additional_properties = additional_properties + return permissions_set + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> PermissionsPermission: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: PermissionsPermission) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_plan.py b/nuon/models/plantypes_action_workflow_run_plan.py new file mode 100644 index 00000000..b3205d0e --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan.py @@ -0,0 +1,213 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_action_workflow_run_plan_attrs import PlantypesActionWorkflowRunPlanAttrs + from ..models.plantypes_action_workflow_run_plan_builtin_env_vars import ( + PlantypesActionWorkflowRunPlanBuiltinEnvVars, + ) + from ..models.plantypes_action_workflow_run_plan_override_env_vars import ( + PlantypesActionWorkflowRunPlanOverrideEnvVars, + ) + from ..models.plantypes_action_workflow_run_step_plan import PlantypesActionWorkflowRunStepPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + +T = TypeVar("T", bound="PlantypesActionWorkflowRunPlan") + + +@_attrs_define +class PlantypesActionWorkflowRunPlan: + """ + Attributes: + attrs (Union[Unset, PlantypesActionWorkflowRunPlanAttrs]): + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + builtin_env_vars (Union[Unset, PlantypesActionWorkflowRunPlanBuiltinEnvVars]): + cluster_info (Union[Unset, KubeClusterInfo]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + override_env_vars (Union[Unset, PlantypesActionWorkflowRunPlanOverrideEnvVars]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + steps (Union[Unset, list['PlantypesActionWorkflowRunStepPlan']]): + """ + + attrs: Union[Unset, "PlantypesActionWorkflowRunPlanAttrs"] = UNSET + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + builtin_env_vars: Union[Unset, "PlantypesActionWorkflowRunPlanBuiltinEnvVars"] = UNSET + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + override_env_vars: Union[Unset, "PlantypesActionWorkflowRunPlanOverrideEnvVars"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + steps: Union[Unset, list["PlantypesActionWorkflowRunStepPlan"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attrs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.attrs, Unset): + attrs = self.attrs.to_dict() + + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + builtin_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.builtin_env_vars, Unset): + builtin_env_vars = self.builtin_env_vars.to_dict() + + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + id = self.id + + install_id = self.install_id + + override_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.override_env_vars, Unset): + override_env_vars = self.override_env_vars.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attrs is not UNSET: + field_dict["attrs"] = attrs + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if builtin_env_vars is not UNSET: + field_dict["builtin_env_vars"] = builtin_env_vars + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if override_env_vars is not UNSET: + field_dict["override_env_vars"] = override_env_vars + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if steps is not UNSET: + field_dict["steps"] = steps + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_action_workflow_run_plan_attrs import PlantypesActionWorkflowRunPlanAttrs + from ..models.plantypes_action_workflow_run_plan_builtin_env_vars import ( + PlantypesActionWorkflowRunPlanBuiltinEnvVars, + ) + from ..models.plantypes_action_workflow_run_plan_override_env_vars import ( + PlantypesActionWorkflowRunPlanOverrideEnvVars, + ) + from ..models.plantypes_action_workflow_run_step_plan import PlantypesActionWorkflowRunStepPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + d = dict(src_dict) + _attrs = d.pop("attrs", UNSET) + attrs: Union[Unset, PlantypesActionWorkflowRunPlanAttrs] + if isinstance(_attrs, Unset): + attrs = UNSET + else: + attrs = PlantypesActionWorkflowRunPlanAttrs.from_dict(_attrs) + + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _builtin_env_vars = d.pop("builtin_env_vars", UNSET) + builtin_env_vars: Union[Unset, PlantypesActionWorkflowRunPlanBuiltinEnvVars] + if isinstance(_builtin_env_vars, Unset): + builtin_env_vars = UNSET + else: + builtin_env_vars = PlantypesActionWorkflowRunPlanBuiltinEnvVars.from_dict(_builtin_env_vars) + + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + _override_env_vars = d.pop("override_env_vars", UNSET) + override_env_vars: Union[Unset, PlantypesActionWorkflowRunPlanOverrideEnvVars] + if isinstance(_override_env_vars, Unset): + override_env_vars = UNSET + else: + override_env_vars = PlantypesActionWorkflowRunPlanOverrideEnvVars.from_dict(_override_env_vars) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = PlantypesActionWorkflowRunStepPlan.from_dict(steps_item_data) + + steps.append(steps_item) + + plantypes_action_workflow_run_plan = cls( + attrs=attrs, + aws_auth=aws_auth, + builtin_env_vars=builtin_env_vars, + cluster_info=cluster_info, + id=id, + install_id=install_id, + override_env_vars=override_env_vars, + sandbox_mode=sandbox_mode, + steps=steps, + ) + + plantypes_action_workflow_run_plan.additional_properties = d + return plantypes_action_workflow_run_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_plan_attrs.py b/nuon/models/plantypes_action_workflow_run_plan_attrs.py new file mode 100644 index 00000000..c54a8331 --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan_attrs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesActionWorkflowRunPlanAttrs") + + +@_attrs_define +class PlantypesActionWorkflowRunPlanAttrs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_action_workflow_run_plan_attrs = cls() + + plantypes_action_workflow_run_plan_attrs.additional_properties = d + return plantypes_action_workflow_run_plan_attrs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py b/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py new file mode 100644 index 00000000..c25aafb0 --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesActionWorkflowRunPlanBuiltinEnvVars") + + +@_attrs_define +class PlantypesActionWorkflowRunPlanBuiltinEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_action_workflow_run_plan_builtin_env_vars = cls() + + plantypes_action_workflow_run_plan_builtin_env_vars.additional_properties = d + return plantypes_action_workflow_run_plan_builtin_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py b/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py new file mode 100644 index 00000000..4300ac9a --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesActionWorkflowRunPlanOverrideEnvVars") + + +@_attrs_define +class PlantypesActionWorkflowRunPlanOverrideEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_action_workflow_run_plan_override_env_vars = cls() + + plantypes_action_workflow_run_plan_override_env_vars.additional_properties = d + return plantypes_action_workflow_run_plan_override_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_step_plan.py b/nuon/models/plantypes_action_workflow_run_step_plan.py new file mode 100644 index 00000000..635e8170 --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_step_plan.py @@ -0,0 +1,141 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_action_workflow_run_step_plan_attrs import PlantypesActionWorkflowRunStepPlanAttrs + from ..models.plantypes_action_workflow_run_step_plan_interpolated_env_vars import ( + PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars, + ) + from ..models.plantypes_git_source import PlantypesGitSource + + +T = TypeVar("T", bound="PlantypesActionWorkflowRunStepPlan") + + +@_attrs_define +class PlantypesActionWorkflowRunStepPlan: + """ + Attributes: + attrs (Union[Unset, PlantypesActionWorkflowRunStepPlanAttrs]): + git_source (Union[Unset, PlantypesGitSource]): + interpolated_command (Union[Unset, str]): + interpolated_env_vars (Union[Unset, PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars]): + interpolated_inline_contents (Union[Unset, str]): + run_id (Union[Unset, str]): + """ + + attrs: Union[Unset, "PlantypesActionWorkflowRunStepPlanAttrs"] = UNSET + git_source: Union[Unset, "PlantypesGitSource"] = UNSET + interpolated_command: Union[Unset, str] = UNSET + interpolated_env_vars: Union[Unset, "PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars"] = UNSET + interpolated_inline_contents: Union[Unset, str] = UNSET + run_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attrs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.attrs, Unset): + attrs = self.attrs.to_dict() + + git_source: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.git_source, Unset): + git_source = self.git_source.to_dict() + + interpolated_command = self.interpolated_command + + interpolated_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.interpolated_env_vars, Unset): + interpolated_env_vars = self.interpolated_env_vars.to_dict() + + interpolated_inline_contents = self.interpolated_inline_contents + + run_id = self.run_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attrs is not UNSET: + field_dict["attrs"] = attrs + if git_source is not UNSET: + field_dict["git_source"] = git_source + if interpolated_command is not UNSET: + field_dict["interpolated_command"] = interpolated_command + if interpolated_env_vars is not UNSET: + field_dict["interpolated_env_vars"] = interpolated_env_vars + if interpolated_inline_contents is not UNSET: + field_dict["interpolated_inline_contents"] = interpolated_inline_contents + if run_id is not UNSET: + field_dict["run_id"] = run_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_action_workflow_run_step_plan_attrs import PlantypesActionWorkflowRunStepPlanAttrs + from ..models.plantypes_action_workflow_run_step_plan_interpolated_env_vars import ( + PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars, + ) + from ..models.plantypes_git_source import PlantypesGitSource + + d = dict(src_dict) + _attrs = d.pop("attrs", UNSET) + attrs: Union[Unset, PlantypesActionWorkflowRunStepPlanAttrs] + if isinstance(_attrs, Unset): + attrs = UNSET + else: + attrs = PlantypesActionWorkflowRunStepPlanAttrs.from_dict(_attrs) + + _git_source = d.pop("git_source", UNSET) + git_source: Union[Unset, PlantypesGitSource] + if isinstance(_git_source, Unset): + git_source = UNSET + else: + git_source = PlantypesGitSource.from_dict(_git_source) + + interpolated_command = d.pop("interpolated_command", UNSET) + + _interpolated_env_vars = d.pop("interpolated_env_vars", UNSET) + interpolated_env_vars: Union[Unset, PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars] + if isinstance(_interpolated_env_vars, Unset): + interpolated_env_vars = UNSET + else: + interpolated_env_vars = PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars.from_dict( + _interpolated_env_vars + ) + + interpolated_inline_contents = d.pop("interpolated_inline_contents", UNSET) + + run_id = d.pop("run_id", UNSET) + + plantypes_action_workflow_run_step_plan = cls( + attrs=attrs, + git_source=git_source, + interpolated_command=interpolated_command, + interpolated_env_vars=interpolated_env_vars, + interpolated_inline_contents=interpolated_inline_contents, + run_id=run_id, + ) + + plantypes_action_workflow_run_step_plan.additional_properties = d + return plantypes_action_workflow_run_step_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py b/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py new file mode 100644 index 00000000..17c3392e --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesActionWorkflowRunStepPlanAttrs") + + +@_attrs_define +class PlantypesActionWorkflowRunStepPlanAttrs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_action_workflow_run_step_plan_attrs = cls() + + plantypes_action_workflow_run_step_plan_attrs.additional_properties = d + return plantypes_action_workflow_run_step_plan_attrs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py b/nuon/models/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py new file mode 100644 index 00000000..12ee1dbb --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars") + + +@_attrs_define +class PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_action_workflow_run_step_plan_interpolated_env_vars = cls() + + plantypes_action_workflow_run_step_plan_interpolated_env_vars.additional_properties = d + return plantypes_action_workflow_run_step_plan_interpolated_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_build_plan.py b/nuon/models/plantypes_build_plan.py new file mode 100644 index 00000000..a48f6bd2 --- /dev/null +++ b/nuon/models/plantypes_build_plan.py @@ -0,0 +1,201 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_container_image_pull_plan import PlantypesContainerImagePullPlan + from ..models.plantypes_docker_build_plan import PlantypesDockerBuildPlan + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_helm_build_plan import PlantypesHelmBuildPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_build_plan import PlantypesTerraformBuildPlan + + +T = TypeVar("T", bound="PlantypesBuildPlan") + + +@_attrs_define +class PlantypesBuildPlan: + """ + Attributes: + dst_registry (ConfigsOCIRegistryRepository): + dst_tag (str): + component_build_id (Union[Unset, str]): + component_id (Union[Unset, str]): + container_image_pull_plan (Union[Unset, PlantypesContainerImagePullPlan]): + docker_build_plan (Union[Unset, PlantypesDockerBuildPlan]): + git_source (Union[Unset, PlantypesGitSource]): + helm_build_plan (Union[Unset, PlantypesHelmBuildPlan]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + terraform_build_plan (Union[Unset, PlantypesTerraformBuildPlan]): + """ + + dst_registry: "ConfigsOCIRegistryRepository" + dst_tag: str + component_build_id: Union[Unset, str] = UNSET + component_id: Union[Unset, str] = UNSET + container_image_pull_plan: Union[Unset, "PlantypesContainerImagePullPlan"] = UNSET + docker_build_plan: Union[Unset, "PlantypesDockerBuildPlan"] = UNSET + git_source: Union[Unset, "PlantypesGitSource"] = UNSET + helm_build_plan: Union[Unset, "PlantypesHelmBuildPlan"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + terraform_build_plan: Union[Unset, "PlantypesTerraformBuildPlan"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dst_registry = self.dst_registry.to_dict() + + dst_tag = self.dst_tag + + component_build_id = self.component_build_id + + component_id = self.component_id + + container_image_pull_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.container_image_pull_plan, Unset): + container_image_pull_plan = self.container_image_pull_plan.to_dict() + + docker_build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.docker_build_plan, Unset): + docker_build_plan = self.docker_build_plan.to_dict() + + git_source: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.git_source, Unset): + git_source = self.git_source.to_dict() + + helm_build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm_build_plan, Unset): + helm_build_plan = self.helm_build_plan.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + terraform_build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_build_plan, Unset): + terraform_build_plan = self.terraform_build_plan.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dst_registry": dst_registry, + "dst_tag": dst_tag, + } + ) + if component_build_id is not UNSET: + field_dict["component_build_id"] = component_build_id + if component_id is not UNSET: + field_dict["component_id"] = component_id + if container_image_pull_plan is not UNSET: + field_dict["container_image_pull_plan"] = container_image_pull_plan + if docker_build_plan is not UNSET: + field_dict["docker_build_plan"] = docker_build_plan + if git_source is not UNSET: + field_dict["git_source"] = git_source + if helm_build_plan is not UNSET: + field_dict["helm_build_plan"] = helm_build_plan + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if terraform_build_plan is not UNSET: + field_dict["terraform_build_plan"] = terraform_build_plan + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_container_image_pull_plan import PlantypesContainerImagePullPlan + from ..models.plantypes_docker_build_plan import PlantypesDockerBuildPlan + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_helm_build_plan import PlantypesHelmBuildPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_build_plan import PlantypesTerraformBuildPlan + + d = dict(src_dict) + dst_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("dst_registry")) + + dst_tag = d.pop("dst_tag") + + component_build_id = d.pop("component_build_id", UNSET) + + component_id = d.pop("component_id", UNSET) + + _container_image_pull_plan = d.pop("container_image_pull_plan", UNSET) + container_image_pull_plan: Union[Unset, PlantypesContainerImagePullPlan] + if isinstance(_container_image_pull_plan, Unset): + container_image_pull_plan = UNSET + else: + container_image_pull_plan = PlantypesContainerImagePullPlan.from_dict(_container_image_pull_plan) + + _docker_build_plan = d.pop("docker_build_plan", UNSET) + docker_build_plan: Union[Unset, PlantypesDockerBuildPlan] + if isinstance(_docker_build_plan, Unset): + docker_build_plan = UNSET + else: + docker_build_plan = PlantypesDockerBuildPlan.from_dict(_docker_build_plan) + + _git_source = d.pop("git_source", UNSET) + git_source: Union[Unset, PlantypesGitSource] + if isinstance(_git_source, Unset): + git_source = UNSET + else: + git_source = PlantypesGitSource.from_dict(_git_source) + + _helm_build_plan = d.pop("helm_build_plan", UNSET) + helm_build_plan: Union[Unset, PlantypesHelmBuildPlan] + if isinstance(_helm_build_plan, Unset): + helm_build_plan = UNSET + else: + helm_build_plan = PlantypesHelmBuildPlan.from_dict(_helm_build_plan) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + _terraform_build_plan = d.pop("terraform_build_plan", UNSET) + terraform_build_plan: Union[Unset, PlantypesTerraformBuildPlan] + if isinstance(_terraform_build_plan, Unset): + terraform_build_plan = UNSET + else: + terraform_build_plan = PlantypesTerraformBuildPlan.from_dict(_terraform_build_plan) + + plantypes_build_plan = cls( + dst_registry=dst_registry, + dst_tag=dst_tag, + component_build_id=component_build_id, + component_id=component_id, + container_image_pull_plan=container_image_pull_plan, + docker_build_plan=docker_build_plan, + git_source=git_source, + helm_build_plan=helm_build_plan, + sandbox_mode=sandbox_mode, + terraform_build_plan=terraform_build_plan, + ) + + plantypes_build_plan.additional_properties = d + return plantypes_build_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_composite_plan.py b/nuon/models/plantypes_composite_plan.py new file mode 100644 index 00000000..edf3c9af --- /dev/null +++ b/nuon/models/plantypes_composite_plan.py @@ -0,0 +1,162 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_action_workflow_run_plan import PlantypesActionWorkflowRunPlan + from ..models.plantypes_build_plan import PlantypesBuildPlan + from ..models.plantypes_deploy_plan import PlantypesDeployPlan + from ..models.plantypes_sandbox_run_plan import PlantypesSandboxRunPlan + from ..models.plantypes_sync_oci_plan import PlantypesSyncOCIPlan + from ..models.plantypes_sync_secrets_plan import PlantypesSyncSecretsPlan + + +T = TypeVar("T", bound="PlantypesCompositePlan") + + +@_attrs_define +class PlantypesCompositePlan: + """ + Attributes: + action_workflow_run_plan (Union[Unset, PlantypesActionWorkflowRunPlan]): + build_plan (Union[Unset, PlantypesBuildPlan]): + deploy_plan (Union[Unset, PlantypesDeployPlan]): + sandbox_run_plan (Union[Unset, PlantypesSandboxRunPlan]): + sync_oci_plan (Union[Unset, PlantypesSyncOCIPlan]): + sync_secrets_plan (Union[Unset, PlantypesSyncSecretsPlan]): + """ + + action_workflow_run_plan: Union[Unset, "PlantypesActionWorkflowRunPlan"] = UNSET + build_plan: Union[Unset, "PlantypesBuildPlan"] = UNSET + deploy_plan: Union[Unset, "PlantypesDeployPlan"] = UNSET + sandbox_run_plan: Union[Unset, "PlantypesSandboxRunPlan"] = UNSET + sync_oci_plan: Union[Unset, "PlantypesSyncOCIPlan"] = UNSET + sync_secrets_plan: Union[Unset, "PlantypesSyncSecretsPlan"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_run_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.action_workflow_run_plan, Unset): + action_workflow_run_plan = self.action_workflow_run_plan.to_dict() + + build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.build_plan, Unset): + build_plan = self.build_plan.to_dict() + + deploy_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.deploy_plan, Unset): + deploy_plan = self.deploy_plan.to_dict() + + sandbox_run_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_run_plan, Unset): + sandbox_run_plan = self.sandbox_run_plan.to_dict() + + sync_oci_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sync_oci_plan, Unset): + sync_oci_plan = self.sync_oci_plan.to_dict() + + sync_secrets_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sync_secrets_plan, Unset): + sync_secrets_plan = self.sync_secrets_plan.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_run_plan is not UNSET: + field_dict["action_workflow_run_plan"] = action_workflow_run_plan + if build_plan is not UNSET: + field_dict["build_plan"] = build_plan + if deploy_plan is not UNSET: + field_dict["deploy_plan"] = deploy_plan + if sandbox_run_plan is not UNSET: + field_dict["sandbox_run_plan"] = sandbox_run_plan + if sync_oci_plan is not UNSET: + field_dict["sync_oci_plan"] = sync_oci_plan + if sync_secrets_plan is not UNSET: + field_dict["sync_secrets_plan"] = sync_secrets_plan + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_action_workflow_run_plan import PlantypesActionWorkflowRunPlan + from ..models.plantypes_build_plan import PlantypesBuildPlan + from ..models.plantypes_deploy_plan import PlantypesDeployPlan + from ..models.plantypes_sandbox_run_plan import PlantypesSandboxRunPlan + from ..models.plantypes_sync_oci_plan import PlantypesSyncOCIPlan + from ..models.plantypes_sync_secrets_plan import PlantypesSyncSecretsPlan + + d = dict(src_dict) + _action_workflow_run_plan = d.pop("action_workflow_run_plan", UNSET) + action_workflow_run_plan: Union[Unset, PlantypesActionWorkflowRunPlan] + if isinstance(_action_workflow_run_plan, Unset): + action_workflow_run_plan = UNSET + else: + action_workflow_run_plan = PlantypesActionWorkflowRunPlan.from_dict(_action_workflow_run_plan) + + _build_plan = d.pop("build_plan", UNSET) + build_plan: Union[Unset, PlantypesBuildPlan] + if isinstance(_build_plan, Unset): + build_plan = UNSET + else: + build_plan = PlantypesBuildPlan.from_dict(_build_plan) + + _deploy_plan = d.pop("deploy_plan", UNSET) + deploy_plan: Union[Unset, PlantypesDeployPlan] + if isinstance(_deploy_plan, Unset): + deploy_plan = UNSET + else: + deploy_plan = PlantypesDeployPlan.from_dict(_deploy_plan) + + _sandbox_run_plan = d.pop("sandbox_run_plan", UNSET) + sandbox_run_plan: Union[Unset, PlantypesSandboxRunPlan] + if isinstance(_sandbox_run_plan, Unset): + sandbox_run_plan = UNSET + else: + sandbox_run_plan = PlantypesSandboxRunPlan.from_dict(_sandbox_run_plan) + + _sync_oci_plan = d.pop("sync_oci_plan", UNSET) + sync_oci_plan: Union[Unset, PlantypesSyncOCIPlan] + if isinstance(_sync_oci_plan, Unset): + sync_oci_plan = UNSET + else: + sync_oci_plan = PlantypesSyncOCIPlan.from_dict(_sync_oci_plan) + + _sync_secrets_plan = d.pop("sync_secrets_plan", UNSET) + sync_secrets_plan: Union[Unset, PlantypesSyncSecretsPlan] + if isinstance(_sync_secrets_plan, Unset): + sync_secrets_plan = UNSET + else: + sync_secrets_plan = PlantypesSyncSecretsPlan.from_dict(_sync_secrets_plan) + + plantypes_composite_plan = cls( + action_workflow_run_plan=action_workflow_run_plan, + build_plan=build_plan, + deploy_plan=deploy_plan, + sandbox_run_plan=sandbox_run_plan, + sync_oci_plan=sync_oci_plan, + sync_secrets_plan=sync_secrets_plan, + ) + + plantypes_composite_plan.additional_properties = d + return plantypes_composite_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_container_image_pull_plan.py b/nuon/models/plantypes_container_image_pull_plan.py new file mode 100644 index 00000000..cbb50183 --- /dev/null +++ b/nuon/models/plantypes_container_image_pull_plan.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + + +T = TypeVar("T", bound="PlantypesContainerImagePullPlan") + + +@_attrs_define +class PlantypesContainerImagePullPlan: + """ + Attributes: + image (Union[Unset, str]): + repo_config (Union[Unset, ConfigsOCIRegistryRepository]): + tag (Union[Unset, str]): + """ + + image: Union[Unset, str] = UNSET + repo_config: Union[Unset, "ConfigsOCIRegistryRepository"] = UNSET + tag: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + image = self.image + + repo_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.repo_config, Unset): + repo_config = self.repo_config.to_dict() + + tag = self.tag + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if image is not UNSET: + field_dict["image"] = image + if repo_config is not UNSET: + field_dict["repo_config"] = repo_config + if tag is not UNSET: + field_dict["tag"] = tag + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + + d = dict(src_dict) + image = d.pop("image", UNSET) + + _repo_config = d.pop("repo_config", UNSET) + repo_config: Union[Unset, ConfigsOCIRegistryRepository] + if isinstance(_repo_config, Unset): + repo_config = UNSET + else: + repo_config = ConfigsOCIRegistryRepository.from_dict(_repo_config) + + tag = d.pop("tag", UNSET) + + plantypes_container_image_pull_plan = cls( + image=image, + repo_config=repo_config, + tag=tag, + ) + + plantypes_container_image_pull_plan.additional_properties = d + return plantypes_container_image_pull_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_deploy_plan.py b/nuon/models/plantypes_deploy_plan.py new file mode 100644 index 00000000..053f0469 --- /dev/null +++ b/nuon/models/plantypes_deploy_plan.py @@ -0,0 +1,229 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_helm_deploy_plan import PlantypesHelmDeployPlan + from ..models.plantypes_kubernetes_manifest_deploy_plan import PlantypesKubernetesManifestDeployPlan + from ..models.plantypes_noop_deploy_plan import PlantypesNoopDeployPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_deploy_plan import PlantypesTerraformDeployPlan + + +T = TypeVar("T", bound="PlantypesDeployPlan") + + +@_attrs_define +class PlantypesDeployPlan: + """ + Attributes: + src_registry (ConfigsOCIRegistryRepository): + src_tag (str): + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + apply_plan_contents (Union[Unset, str]): The following field is for applying a plan that is already save + apply_plan_display (Union[Unset, str]): This field is for storing a human legible plan or corollary + representation + component_id (Union[Unset, str]): + component_name (Union[Unset, str]): + helm (Union[Unset, PlantypesHelmDeployPlan]): + install_id (Union[Unset, str]): + kubernetes_manifest (Union[Unset, PlantypesKubernetesManifestDeployPlan]): + noop (Union[Unset, PlantypesNoopDeployPlan]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + terraform (Union[Unset, PlantypesTerraformDeployPlan]): + """ + + src_registry: "ConfigsOCIRegistryRepository" + src_tag: str + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + apply_plan_contents: Union[Unset, str] = UNSET + apply_plan_display: Union[Unset, str] = UNSET + component_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + helm: Union[Unset, "PlantypesHelmDeployPlan"] = UNSET + install_id: Union[Unset, str] = UNSET + kubernetes_manifest: Union[Unset, "PlantypesKubernetesManifestDeployPlan"] = UNSET + noop: Union[Unset, "PlantypesNoopDeployPlan"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + terraform: Union[Unset, "PlantypesTerraformDeployPlan"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + src_registry = self.src_registry.to_dict() + + src_tag = self.src_tag + + app_config_id = self.app_config_id + + app_id = self.app_id + + apply_plan_contents = self.apply_plan_contents + + apply_plan_display = self.apply_plan_display + + component_id = self.component_id + + component_name = self.component_name + + helm: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm, Unset): + helm = self.helm.to_dict() + + install_id = self.install_id + + kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.kubernetes_manifest, Unset): + kubernetes_manifest = self.kubernetes_manifest.to_dict() + + noop: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.noop, Unset): + noop = self.noop.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + terraform: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform, Unset): + terraform = self.terraform.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "src_registry": src_registry, + "src_tag": src_tag, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if apply_plan_contents is not UNSET: + field_dict["apply_plan_contents"] = apply_plan_contents + if apply_plan_display is not UNSET: + field_dict["apply_plan_display"] = apply_plan_display + if component_id is not UNSET: + field_dict["component_id"] = component_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if helm is not UNSET: + field_dict["helm"] = helm + if install_id is not UNSET: + field_dict["install_id"] = install_id + if kubernetes_manifest is not UNSET: + field_dict["kubernetes_manifest"] = kubernetes_manifest + if noop is not UNSET: + field_dict["noop"] = noop + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if terraform is not UNSET: + field_dict["terraform"] = terraform + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_helm_deploy_plan import PlantypesHelmDeployPlan + from ..models.plantypes_kubernetes_manifest_deploy_plan import PlantypesKubernetesManifestDeployPlan + from ..models.plantypes_noop_deploy_plan import PlantypesNoopDeployPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_deploy_plan import PlantypesTerraformDeployPlan + + d = dict(src_dict) + src_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("src_registry")) + + src_tag = d.pop("src_tag") + + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + apply_plan_contents = d.pop("apply_plan_contents", UNSET) + + apply_plan_display = d.pop("apply_plan_display", UNSET) + + component_id = d.pop("component_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + _helm = d.pop("helm", UNSET) + helm: Union[Unset, PlantypesHelmDeployPlan] + if isinstance(_helm, Unset): + helm = UNSET + else: + helm = PlantypesHelmDeployPlan.from_dict(_helm) + + install_id = d.pop("install_id", UNSET) + + _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) + kubernetes_manifest: Union[Unset, PlantypesKubernetesManifestDeployPlan] + if isinstance(_kubernetes_manifest, Unset): + kubernetes_manifest = UNSET + else: + kubernetes_manifest = PlantypesKubernetesManifestDeployPlan.from_dict(_kubernetes_manifest) + + _noop = d.pop("noop", UNSET) + noop: Union[Unset, PlantypesNoopDeployPlan] + if isinstance(_noop, Unset): + noop = UNSET + else: + noop = PlantypesNoopDeployPlan.from_dict(_noop) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + _terraform = d.pop("terraform", UNSET) + terraform: Union[Unset, PlantypesTerraformDeployPlan] + if isinstance(_terraform, Unset): + terraform = UNSET + else: + terraform = PlantypesTerraformDeployPlan.from_dict(_terraform) + + plantypes_deploy_plan = cls( + src_registry=src_registry, + src_tag=src_tag, + app_config_id=app_config_id, + app_id=app_id, + apply_plan_contents=apply_plan_contents, + apply_plan_display=apply_plan_display, + component_id=component_id, + component_name=component_name, + helm=helm, + install_id=install_id, + kubernetes_manifest=kubernetes_manifest, + noop=noop, + sandbox_mode=sandbox_mode, + terraform=terraform, + ) + + plantypes_deploy_plan.additional_properties = d + return plantypes_deploy_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_docker_build_plan.py b/nuon/models/plantypes_docker_build_plan.py new file mode 100644 index 00000000..9a516f34 --- /dev/null +++ b/nuon/models/plantypes_docker_build_plan.py @@ -0,0 +1,99 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_docker_build_plan_build_args import PlantypesDockerBuildPlanBuildArgs + + +T = TypeVar("T", bound="PlantypesDockerBuildPlan") + + +@_attrs_define +class PlantypesDockerBuildPlan: + """ + Attributes: + build_args (Union[Unset, PlantypesDockerBuildPlanBuildArgs]): + context (Union[Unset, str]): + dockerfile (Union[Unset, str]): + target (Union[Unset, str]): + """ + + build_args: Union[Unset, "PlantypesDockerBuildPlanBuildArgs"] = UNSET + context: Union[Unset, str] = UNSET + dockerfile: Union[Unset, str] = UNSET + target: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_args: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.build_args, Unset): + build_args = self.build_args.to_dict() + + context = self.context + + dockerfile = self.dockerfile + + target = self.target + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_args is not UNSET: + field_dict["build_args"] = build_args + if context is not UNSET: + field_dict["context"] = context + if dockerfile is not UNSET: + field_dict["dockerfile"] = dockerfile + if target is not UNSET: + field_dict["target"] = target + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_docker_build_plan_build_args import PlantypesDockerBuildPlanBuildArgs + + d = dict(src_dict) + _build_args = d.pop("build_args", UNSET) + build_args: Union[Unset, PlantypesDockerBuildPlanBuildArgs] + if isinstance(_build_args, Unset): + build_args = UNSET + else: + build_args = PlantypesDockerBuildPlanBuildArgs.from_dict(_build_args) + + context = d.pop("context", UNSET) + + dockerfile = d.pop("dockerfile", UNSET) + + target = d.pop("target", UNSET) + + plantypes_docker_build_plan = cls( + build_args=build_args, + context=context, + dockerfile=dockerfile, + target=target, + ) + + plantypes_docker_build_plan.additional_properties = d + return plantypes_docker_build_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_docker_build_plan_build_args.py b/nuon/models/plantypes_docker_build_plan_build_args.py new file mode 100644 index 00000000..21b331e6 --- /dev/null +++ b/nuon/models/plantypes_docker_build_plan_build_args.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesDockerBuildPlanBuildArgs") + + +@_attrs_define +class PlantypesDockerBuildPlanBuildArgs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_docker_build_plan_build_args = cls() + + plantypes_docker_build_plan_build_args.additional_properties = d + return plantypes_docker_build_plan_build_args + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_git_source.py b/nuon/models/plantypes_git_source.py new file mode 100644 index 00000000..651268d2 --- /dev/null +++ b/nuon/models/plantypes_git_source.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesGitSource") + + +@_attrs_define +class PlantypesGitSource: + """ + Attributes: + path (str): + ref (str): + url (str): + recurse_submodules (Union[Unset, bool]): + """ + + path: str + ref: str + url: str + recurse_submodules: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + path = self.path + + ref = self.ref + + url = self.url + + recurse_submodules = self.recurse_submodules + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "ref": ref, + "url": url, + } + ) + if recurse_submodules is not UNSET: + field_dict["recurse_submodules"] = recurse_submodules + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + path = d.pop("path") + + ref = d.pop("ref") + + url = d.pop("url") + + recurse_submodules = d.pop("recurse_submodules", UNSET) + + plantypes_git_source = cls( + path=path, + ref=ref, + url=url, + recurse_submodules=recurse_submodules, + ) + + plantypes_git_source.additional_properties = d + return plantypes_git_source + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_helm_build_plan.py b/nuon/models/plantypes_helm_build_plan.py new file mode 100644 index 00000000..1262f829 --- /dev/null +++ b/nuon/models/plantypes_helm_build_plan.py @@ -0,0 +1,72 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_helm_build_plan_labels import PlantypesHelmBuildPlanLabels + + +T = TypeVar("T", bound="PlantypesHelmBuildPlan") + + +@_attrs_define +class PlantypesHelmBuildPlan: + """ + Attributes: + labels (Union[Unset, PlantypesHelmBuildPlanLabels]): + """ + + labels: Union[Unset, "PlantypesHelmBuildPlanLabels"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + labels: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if labels is not UNSET: + field_dict["labels"] = labels + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_helm_build_plan_labels import PlantypesHelmBuildPlanLabels + + d = dict(src_dict) + _labels = d.pop("labels", UNSET) + labels: Union[Unset, PlantypesHelmBuildPlanLabels] + if isinstance(_labels, Unset): + labels = UNSET + else: + labels = PlantypesHelmBuildPlanLabels.from_dict(_labels) + + plantypes_helm_build_plan = cls( + labels=labels, + ) + + plantypes_helm_build_plan.additional_properties = d + return plantypes_helm_build_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_helm_build_plan_labels.py b/nuon/models/plantypes_helm_build_plan_labels.py new file mode 100644 index 00000000..2d636055 --- /dev/null +++ b/nuon/models/plantypes_helm_build_plan_labels.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesHelmBuildPlanLabels") + + +@_attrs_define +class PlantypesHelmBuildPlanLabels: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_helm_build_plan_labels = cls() + + plantypes_helm_build_plan_labels.additional_properties = d + return plantypes_helm_build_plan_labels + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_helm_deploy_plan.py b/nuon/models/plantypes_helm_deploy_plan.py new file mode 100644 index 00000000..2bb129bb --- /dev/null +++ b/nuon/models/plantypes_helm_deploy_plan.py @@ -0,0 +1,160 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_helm_value import PlantypesHelmValue + + +T = TypeVar("T", bound="PlantypesHelmDeployPlan") + + +@_attrs_define +class PlantypesHelmDeployPlan: + """ + Attributes: + cluster_info (Union[Unset, KubeClusterInfo]): + create_namespace (Union[Unset, bool]): + helm_chart_id (Union[Unset, str]): + name (Union[Unset, str]): NOTE(jm): these fields should probably just come from the app config, however we keep + them around for + debuggability + namespace (Union[Unset, str]): + storage_driver (Union[Unset, str]): + take_ownership (Union[Unset, bool]): + values (Union[Unset, list['PlantypesHelmValue']]): + values_files (Union[Unset, list[str]]): + """ + + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + create_namespace: Union[Unset, bool] = UNSET + helm_chart_id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + storage_driver: Union[Unset, str] = UNSET + take_ownership: Union[Unset, bool] = UNSET + values: Union[Unset, list["PlantypesHelmValue"]] = UNSET + values_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + create_namespace = self.create_namespace + + helm_chart_id = self.helm_chart_id + + name = self.name + + namespace = self.namespace + + storage_driver = self.storage_driver + + take_ownership = self.take_ownership + + values: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + values_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.values_files, Unset): + values_files = self.values_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if create_namespace is not UNSET: + field_dict["create_namespace"] = create_namespace + if helm_chart_id is not UNSET: + field_dict["helm_chart_id"] = helm_chart_id + if name is not UNSET: + field_dict["name"] = name + if namespace is not UNSET: + field_dict["namespace"] = namespace + if storage_driver is not UNSET: + field_dict["storage_driver"] = storage_driver + if take_ownership is not UNSET: + field_dict["take_ownership"] = take_ownership + if values is not UNSET: + field_dict["values"] = values + if values_files is not UNSET: + field_dict["values_files"] = values_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_helm_value import PlantypesHelmValue + + d = dict(src_dict) + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + create_namespace = d.pop("create_namespace", UNSET) + + helm_chart_id = d.pop("helm_chart_id", UNSET) + + name = d.pop("name", UNSET) + + namespace = d.pop("namespace", UNSET) + + storage_driver = d.pop("storage_driver", UNSET) + + take_ownership = d.pop("take_ownership", UNSET) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = PlantypesHelmValue.from_dict(values_item_data) + + values.append(values_item) + + values_files = cast(list[str], d.pop("values_files", UNSET)) + + plantypes_helm_deploy_plan = cls( + cluster_info=cluster_info, + create_namespace=create_namespace, + helm_chart_id=helm_chart_id, + name=name, + namespace=namespace, + storage_driver=storage_driver, + take_ownership=take_ownership, + values=values, + values_files=values_files, + ) + + plantypes_helm_deploy_plan.additional_properties = d + return plantypes_helm_deploy_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_helm_sandbox_mode.py b/nuon/models/plantypes_helm_sandbox_mode.py new file mode 100644 index 00000000..37710fc7 --- /dev/null +++ b/nuon/models/plantypes_helm_sandbox_mode.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesHelmSandboxMode") + + +@_attrs_define +class PlantypesHelmSandboxMode: + """ + Attributes: + plan_contents (Union[Unset, str]): + plan_display_contents (Union[Unset, str]): + """ + + plan_contents: Union[Unset, str] = UNSET + plan_display_contents: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_contents = self.plan_contents + + plan_display_contents = self.plan_display_contents + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_contents is not UNSET: + field_dict["plan_contents"] = plan_contents + if plan_display_contents is not UNSET: + field_dict["plan_display_contents"] = plan_display_contents + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_contents = d.pop("plan_contents", UNSET) + + plan_display_contents = d.pop("plan_display_contents", UNSET) + + plantypes_helm_sandbox_mode = cls( + plan_contents=plan_contents, + plan_display_contents=plan_display_contents, + ) + + plantypes_helm_sandbox_mode.additional_properties = d + return plantypes_helm_sandbox_mode + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_helm_value.py b/nuon/models/plantypes_helm_value.py new file mode 100644 index 00000000..4e9695e9 --- /dev/null +++ b/nuon/models/plantypes_helm_value.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesHelmValue") + + +@_attrs_define +class PlantypesHelmValue: + """ + Attributes: + name (Union[Unset, str]): + type_ (Union[Unset, str]): + value (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + type_ = self.type_ + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if type_ is not UNSET: + field_dict["type"] = type_ + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + type_ = d.pop("type", UNSET) + + value = d.pop("value", UNSET) + + plantypes_helm_value = cls( + name=name, + type_=type_, + value=value, + ) + + plantypes_helm_value.additional_properties = d + return plantypes_helm_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/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py b/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py new file mode 100644 index 00000000..41aa8c0d --- /dev/null +++ b/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.kube_cluster_info import KubeClusterInfo + + +T = TypeVar("T", bound="PlantypesKubernetesManifestDeployPlan") + + +@_attrs_define +class PlantypesKubernetesManifestDeployPlan: + """ + Attributes: + cluster_info (Union[Unset, KubeClusterInfo]): + manifest (Union[Unset, str]): + namespace (Union[Unset, str]): + """ + + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + manifest: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + manifest = self.manifest + + namespace = self.namespace + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if manifest is not UNSET: + field_dict["manifest"] = manifest + if namespace is not UNSET: + field_dict["namespace"] = namespace + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.kube_cluster_info import KubeClusterInfo + + d = dict(src_dict) + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + manifest = d.pop("manifest", UNSET) + + namespace = d.pop("namespace", UNSET) + + plantypes_kubernetes_manifest_deploy_plan = cls( + cluster_info=cluster_info, + manifest=manifest, + namespace=namespace, + ) + + plantypes_kubernetes_manifest_deploy_plan.additional_properties = d + return plantypes_kubernetes_manifest_deploy_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_kubernetes_sandbox_mode.py b/nuon/models/plantypes_kubernetes_sandbox_mode.py new file mode 100644 index 00000000..d0e4a69a --- /dev/null +++ b/nuon/models/plantypes_kubernetes_sandbox_mode.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesKubernetesSandboxMode") + + +@_attrs_define +class PlantypesKubernetesSandboxMode: + """ + Attributes: + plan_contents (Union[Unset, str]): + plan_display_contents (Union[Unset, str]): + """ + + plan_contents: Union[Unset, str] = UNSET + plan_display_contents: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_contents = self.plan_contents + + plan_display_contents = self.plan_display_contents + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_contents is not UNSET: + field_dict["plan_contents"] = plan_contents + if plan_display_contents is not UNSET: + field_dict["plan_display_contents"] = plan_display_contents + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_contents = d.pop("plan_contents", UNSET) + + plan_display_contents = d.pop("plan_display_contents", UNSET) + + plantypes_kubernetes_sandbox_mode = cls( + plan_contents=plan_contents, + plan_display_contents=plan_display_contents, + ) + + plantypes_kubernetes_sandbox_mode.additional_properties = d + return plantypes_kubernetes_sandbox_mode + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_kubernetes_secret_sync.py b/nuon/models/plantypes_kubernetes_secret_sync.py new file mode 100644 index 00000000..2c3b9c93 --- /dev/null +++ b/nuon/models/plantypes_kubernetes_secret_sync.py @@ -0,0 +1,106 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesKubernetesSecretSync") + + +@_attrs_define +class PlantypesKubernetesSecretSync: + """ + Attributes: + format_ (Union[Unset, str]): NOTE(jm): this should probably come from the app config, but for now we just use + string parsing to avoid + updating the runner job and save time. + key_name (Union[Unset, str]): + name (Union[Unset, str]): + namespace (Union[Unset, str]): + secret_arn (Union[Unset, str]): + secret_name (Union[Unset, str]): the name of the secret from the config + """ + + format_: Union[Unset, str] = UNSET + key_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + secret_arn: Union[Unset, str] = UNSET + secret_name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + format_ = self.format_ + + key_name = self.key_name + + name = self.name + + namespace = self.namespace + + secret_arn = self.secret_arn + + secret_name = self.secret_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if format_ is not UNSET: + field_dict["format"] = format_ + if key_name is not UNSET: + field_dict["key_name"] = key_name + if name is not UNSET: + field_dict["name"] = name + if namespace is not UNSET: + field_dict["namespace"] = namespace + if secret_arn is not UNSET: + field_dict["secret_arn"] = secret_arn + if secret_name is not UNSET: + field_dict["secret_name"] = secret_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + format_ = d.pop("format", UNSET) + + key_name = d.pop("key_name", UNSET) + + name = d.pop("name", UNSET) + + namespace = d.pop("namespace", UNSET) + + secret_arn = d.pop("secret_arn", UNSET) + + secret_name = d.pop("secret_name", UNSET) + + plantypes_kubernetes_secret_sync = cls( + format_=format_, + key_name=key_name, + name=name, + namespace=namespace, + secret_arn=secret_arn, + secret_name=secret_name, + ) + + plantypes_kubernetes_secret_sync.additional_properties = d + return plantypes_kubernetes_secret_sync + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_noop_deploy_plan.py b/nuon/models/plantypes_noop_deploy_plan.py new file mode 100644 index 00000000..7a0f5963 --- /dev/null +++ b/nuon/models/plantypes_noop_deploy_plan.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesNoopDeployPlan") + + +@_attrs_define +class PlantypesNoopDeployPlan: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_noop_deploy_plan = cls() + + plantypes_noop_deploy_plan.additional_properties = d + return plantypes_noop_deploy_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sandbox_mode.py b/nuon/models/plantypes_sandbox_mode.py new file mode 100644 index 00000000..a6741e85 --- /dev/null +++ b/nuon/models/plantypes_sandbox_mode.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_helm_sandbox_mode import PlantypesHelmSandboxMode + from ..models.plantypes_kubernetes_sandbox_mode import PlantypesKubernetesSandboxMode + from ..models.plantypes_sandbox_mode_outputs import PlantypesSandboxModeOutputs + from ..models.plantypes_terraform_sandbox_mode import PlantypesTerraformSandboxMode + + +T = TypeVar("T", bound="PlantypesSandboxMode") + + +@_attrs_define +class PlantypesSandboxMode: + """ + Attributes: + enabled (Union[Unset, bool]): + helm (Union[Unset, PlantypesHelmSandboxMode]): + kubernetes_manifest (Union[Unset, PlantypesKubernetesSandboxMode]): + outputs (Union[Unset, PlantypesSandboxModeOutputs]): + terraform (Union[Unset, PlantypesTerraformSandboxMode]): + """ + + enabled: Union[Unset, bool] = UNSET + helm: Union[Unset, "PlantypesHelmSandboxMode"] = UNSET + kubernetes_manifest: Union[Unset, "PlantypesKubernetesSandboxMode"] = UNSET + outputs: Union[Unset, "PlantypesSandboxModeOutputs"] = UNSET + terraform: Union[Unset, "PlantypesTerraformSandboxMode"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + enabled = self.enabled + + helm: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm, Unset): + helm = self.helm.to_dict() + + kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.kubernetes_manifest, Unset): + kubernetes_manifest = self.kubernetes_manifest.to_dict() + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + terraform: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform, Unset): + terraform = self.terraform.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if enabled is not UNSET: + field_dict["enabled"] = enabled + if helm is not UNSET: + field_dict["helm"] = helm + if kubernetes_manifest is not UNSET: + field_dict["kubernetes_manifest"] = kubernetes_manifest + if outputs is not UNSET: + field_dict["outputs"] = outputs + if terraform is not UNSET: + field_dict["terraform"] = terraform + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_helm_sandbox_mode import PlantypesHelmSandboxMode + from ..models.plantypes_kubernetes_sandbox_mode import PlantypesKubernetesSandboxMode + from ..models.plantypes_sandbox_mode_outputs import PlantypesSandboxModeOutputs + from ..models.plantypes_terraform_sandbox_mode import PlantypesTerraformSandboxMode + + d = dict(src_dict) + enabled = d.pop("enabled", UNSET) + + _helm = d.pop("helm", UNSET) + helm: Union[Unset, PlantypesHelmSandboxMode] + if isinstance(_helm, Unset): + helm = UNSET + else: + helm = PlantypesHelmSandboxMode.from_dict(_helm) + + _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) + kubernetes_manifest: Union[Unset, PlantypesKubernetesSandboxMode] + if isinstance(_kubernetes_manifest, Unset): + kubernetes_manifest = UNSET + else: + kubernetes_manifest = PlantypesKubernetesSandboxMode.from_dict(_kubernetes_manifest) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, PlantypesSandboxModeOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = PlantypesSandboxModeOutputs.from_dict(_outputs) + + _terraform = d.pop("terraform", UNSET) + terraform: Union[Unset, PlantypesTerraformSandboxMode] + if isinstance(_terraform, Unset): + terraform = UNSET + else: + terraform = PlantypesTerraformSandboxMode.from_dict(_terraform) + + plantypes_sandbox_mode = cls( + enabled=enabled, + helm=helm, + kubernetes_manifest=kubernetes_manifest, + outputs=outputs, + terraform=terraform, + ) + + plantypes_sandbox_mode.additional_properties = d + return plantypes_sandbox_mode + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sandbox_mode_outputs.py b/nuon/models/plantypes_sandbox_mode_outputs.py new file mode 100644 index 00000000..d863ffb6 --- /dev/null +++ b/nuon/models/plantypes_sandbox_mode_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesSandboxModeOutputs") + + +@_attrs_define +class PlantypesSandboxModeOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_sandbox_mode_outputs = cls() + + plantypes_sandbox_mode_outputs.additional_properties = d + return plantypes_sandbox_mode_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sandbox_run_plan.py b/nuon/models/plantypes_sandbox_run_plan.py new file mode 100644 index 00000000..a813de7b --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan.py @@ -0,0 +1,323 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_sandbox_run_plan_env_vars import PlantypesSandboxRunPlanEnvVars + from ..models.plantypes_sandbox_run_plan_policies import PlantypesSandboxRunPlanPolicies + from ..models.plantypes_sandbox_run_plan_vars import PlantypesSandboxRunPlanVars + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_local_archive import PlantypesTerraformLocalArchive + + +T = TypeVar("T", bound="PlantypesSandboxRunPlan") + + +@_attrs_define +class PlantypesSandboxRunPlan: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + apply_plan_contents (Union[Unset, str]): The following field is for applying a plan that is already saved + apply_plan_display (Union[Unset, list[int]]): This field is for storing a human legible plan or corollary + representation + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + env_vars (Union[Unset, PlantypesSandboxRunPlanEnvVars]): + git_source (Union[Unset, PlantypesGitSource]): + hooks (Union[Unset, PlantypesTerraformDeployHooks]): + install_id (Union[Unset, str]): + local_archive (Union[Unset, PlantypesTerraformLocalArchive]): + policies (Union[Unset, PlantypesSandboxRunPlanPolicies]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + state (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState]): + terraform_backend (Union[Unset, PlantypesTerraformBackend]): + vars_ (Union[Unset, PlantypesSandboxRunPlanVars]): + vars_files (Union[Unset, list[str]]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + apply_plan_contents: Union[Unset, str] = UNSET + apply_plan_display: Union[Unset, list[int]] = UNSET + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + env_vars: Union[Unset, "PlantypesSandboxRunPlanEnvVars"] = UNSET + git_source: Union[Unset, "PlantypesGitSource"] = UNSET + hooks: Union[Unset, "PlantypesTerraformDeployHooks"] = UNSET + install_id: Union[Unset, str] = UNSET + local_archive: Union[Unset, "PlantypesTerraformLocalArchive"] = UNSET + policies: Union[Unset, "PlantypesSandboxRunPlanPolicies"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + state: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateState"] = UNSET + terraform_backend: Union[Unset, "PlantypesTerraformBackend"] = UNSET + vars_: Union[Unset, "PlantypesSandboxRunPlanVars"] = UNSET + vars_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + apply_plan_contents = self.apply_plan_contents + + apply_plan_display: Union[Unset, list[int]] = UNSET + if not isinstance(self.apply_plan_display, Unset): + apply_plan_display = self.apply_plan_display + + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + git_source: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.git_source, Unset): + git_source = self.git_source.to_dict() + + hooks: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.hooks, Unset): + hooks = self.hooks.to_dict() + + install_id = self.install_id + + local_archive: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.local_archive, Unset): + local_archive = self.local_archive.to_dict() + + policies: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.policies, Unset): + policies = self.policies.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + state: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + terraform_backend: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_backend, Unset): + terraform_backend = self.terraform_backend.to_dict() + + vars_: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vars_, Unset): + vars_ = self.vars_.to_dict() + + vars_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.vars_files, Unset): + vars_files = self.vars_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if apply_plan_contents is not UNSET: + field_dict["apply_plan_contents"] = apply_plan_contents + if apply_plan_display is not UNSET: + field_dict["apply_plan_display"] = apply_plan_display + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if git_source is not UNSET: + field_dict["git_source"] = git_source + if hooks is not UNSET: + field_dict["hooks"] = hooks + if install_id is not UNSET: + field_dict["install_id"] = install_id + if local_archive is not UNSET: + field_dict["local_archive"] = local_archive + if policies is not UNSET: + field_dict["policies"] = policies + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if state is not UNSET: + field_dict["state"] = state + if terraform_backend is not UNSET: + field_dict["terraform_backend"] = terraform_backend + if vars_ is not UNSET: + field_dict["vars"] = vars_ + if vars_files is not UNSET: + field_dict["vars_files"] = vars_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_sandbox_run_plan_env_vars import PlantypesSandboxRunPlanEnvVars + from ..models.plantypes_sandbox_run_plan_policies import PlantypesSandboxRunPlanPolicies + from ..models.plantypes_sandbox_run_plan_vars import PlantypesSandboxRunPlanVars + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_local_archive import PlantypesTerraformLocalArchive + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + apply_plan_contents = d.pop("apply_plan_contents", UNSET) + + apply_plan_display = cast(list[int], d.pop("apply_plan_display", UNSET)) + + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, PlantypesSandboxRunPlanEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = PlantypesSandboxRunPlanEnvVars.from_dict(_env_vars) + + _git_source = d.pop("git_source", UNSET) + git_source: Union[Unset, PlantypesGitSource] + if isinstance(_git_source, Unset): + git_source = UNSET + else: + git_source = PlantypesGitSource.from_dict(_git_source) + + _hooks = d.pop("hooks", UNSET) + hooks: Union[Unset, PlantypesTerraformDeployHooks] + if isinstance(_hooks, Unset): + hooks = UNSET + else: + hooks = PlantypesTerraformDeployHooks.from_dict(_hooks) + + install_id = d.pop("install_id", UNSET) + + _local_archive = d.pop("local_archive", UNSET) + local_archive: Union[Unset, PlantypesTerraformLocalArchive] + if isinstance(_local_archive, Unset): + local_archive = UNSET + else: + local_archive = PlantypesTerraformLocalArchive.from_dict(_local_archive) + + _policies = d.pop("policies", UNSET) + policies: Union[Unset, PlantypesSandboxRunPlanPolicies] + if isinstance(_policies, Unset): + policies = UNSET + else: + policies = PlantypesSandboxRunPlanPolicies.from_dict(_policies) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + _state = d.pop("state", UNSET) + state: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState] + if isinstance(_state, Unset): + state = UNSET + else: + state = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(_state) + + _terraform_backend = d.pop("terraform_backend", UNSET) + terraform_backend: Union[Unset, PlantypesTerraformBackend] + if isinstance(_terraform_backend, Unset): + terraform_backend = UNSET + else: + terraform_backend = PlantypesTerraformBackend.from_dict(_terraform_backend) + + _vars_ = d.pop("vars", UNSET) + vars_: Union[Unset, PlantypesSandboxRunPlanVars] + if isinstance(_vars_, Unset): + vars_ = UNSET + else: + vars_ = PlantypesSandboxRunPlanVars.from_dict(_vars_) + + vars_files = cast(list[str], d.pop("vars_files", UNSET)) + + plantypes_sandbox_run_plan = cls( + app_config_id=app_config_id, + app_id=app_id, + apply_plan_contents=apply_plan_contents, + apply_plan_display=apply_plan_display, + aws_auth=aws_auth, + azure_auth=azure_auth, + env_vars=env_vars, + git_source=git_source, + hooks=hooks, + install_id=install_id, + local_archive=local_archive, + policies=policies, + sandbox_mode=sandbox_mode, + state=state, + terraform_backend=terraform_backend, + vars_=vars_, + vars_files=vars_files, + ) + + plantypes_sandbox_run_plan.additional_properties = d + return plantypes_sandbox_run_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sandbox_run_plan_env_vars.py b/nuon/models/plantypes_sandbox_run_plan_env_vars.py new file mode 100644 index 00000000..bc4a8205 --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesSandboxRunPlanEnvVars") + + +@_attrs_define +class PlantypesSandboxRunPlanEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_sandbox_run_plan_env_vars = cls() + + plantypes_sandbox_run_plan_env_vars.additional_properties = d + return plantypes_sandbox_run_plan_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sandbox_run_plan_policies.py b/nuon/models/plantypes_sandbox_run_plan_policies.py new file mode 100644 index 00000000..cf1a9d89 --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan_policies.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesSandboxRunPlanPolicies") + + +@_attrs_define +class PlantypesSandboxRunPlanPolicies: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_sandbox_run_plan_policies = cls() + + plantypes_sandbox_run_plan_policies.additional_properties = d + return plantypes_sandbox_run_plan_policies + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sandbox_run_plan_vars.py b/nuon/models/plantypes_sandbox_run_plan_vars.py new file mode 100644 index 00000000..115e9ecb --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesSandboxRunPlanVars") + + +@_attrs_define +class PlantypesSandboxRunPlanVars: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_sandbox_run_plan_vars = cls() + + plantypes_sandbox_run_plan_vars.additional_properties = d + return plantypes_sandbox_run_plan_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sync_oci_plan.py b/nuon/models/plantypes_sync_oci_plan.py new file mode 100644 index 00000000..fbe1bba4 --- /dev/null +++ b/nuon/models/plantypes_sync_oci_plan.py @@ -0,0 +1,109 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + +T = TypeVar("T", bound="PlantypesSyncOCIPlan") + + +@_attrs_define +class PlantypesSyncOCIPlan: + """ + Attributes: + dst_registry (ConfigsOCIRegistryRepository): + dst_tag (str): + src_registry (ConfigsOCIRegistryRepository): + src_tag (str): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + """ + + dst_registry: "ConfigsOCIRegistryRepository" + dst_tag: str + src_registry: "ConfigsOCIRegistryRepository" + src_tag: str + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dst_registry = self.dst_registry.to_dict() + + dst_tag = self.dst_tag + + src_registry = self.src_registry.to_dict() + + src_tag = self.src_tag + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dst_registry": dst_registry, + "dst_tag": dst_tag, + "src_registry": src_registry, + "src_tag": src_tag, + } + ) + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + d = dict(src_dict) + dst_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("dst_registry")) + + dst_tag = d.pop("dst_tag") + + src_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("src_registry")) + + src_tag = d.pop("src_tag") + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + plantypes_sync_oci_plan = cls( + dst_registry=dst_registry, + dst_tag=dst_tag, + src_registry=src_registry, + src_tag=src_tag, + sandbox_mode=sandbox_mode, + ) + + plantypes_sync_oci_plan.additional_properties = d + return plantypes_sync_oci_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_sync_secrets_plan.py b/nuon/models/plantypes_sync_secrets_plan.py new file mode 100644 index 00000000..80df93fa --- /dev/null +++ b/nuon/models/plantypes_sync_secrets_plan.py @@ -0,0 +1,155 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_kubernetes_secret_sync import PlantypesKubernetesSecretSync + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + +T = TypeVar("T", bound="PlantypesSyncSecretsPlan") + + +@_attrs_define +class PlantypesSyncSecretsPlan: + """ + Attributes: + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + cluster_info (Union[Unset, KubeClusterInfo]): + kubernetes_secrets (Union[Unset, list['PlantypesKubernetesSecretSync']]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + """ + + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + kubernetes_secrets: Union[Unset, list["PlantypesKubernetesSecretSync"]] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + kubernetes_secrets: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.kubernetes_secrets, Unset): + kubernetes_secrets = [] + for kubernetes_secrets_item_data in self.kubernetes_secrets: + kubernetes_secrets_item = kubernetes_secrets_item_data.to_dict() + kubernetes_secrets.append(kubernetes_secrets_item) + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if kubernetes_secrets is not UNSET: + field_dict["kubernetes_secrets"] = kubernetes_secrets + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_kubernetes_secret_sync import PlantypesKubernetesSecretSync + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + d = dict(src_dict) + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + kubernetes_secrets = [] + _kubernetes_secrets = d.pop("kubernetes_secrets", UNSET) + for kubernetes_secrets_item_data in _kubernetes_secrets or []: + kubernetes_secrets_item = PlantypesKubernetesSecretSync.from_dict(kubernetes_secrets_item_data) + + kubernetes_secrets.append(kubernetes_secrets_item) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + plantypes_sync_secrets_plan = cls( + aws_auth=aws_auth, + azure_auth=azure_auth, + cluster_info=cluster_info, + kubernetes_secrets=kubernetes_secrets, + sandbox_mode=sandbox_mode, + ) + + plantypes_sync_secrets_plan.additional_properties = d + return plantypes_sync_secrets_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_backend.py b/nuon/models/plantypes_terraform_backend.py new file mode 100644 index 00000000..4a5f62c0 --- /dev/null +++ b/nuon/models/plantypes_terraform_backend.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesTerraformBackend") + + +@_attrs_define +class PlantypesTerraformBackend: + """ + Attributes: + workspace_id (str): + """ + + workspace_id: str + additional_properties: dict[str, Any] = _attrs_field(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( + { + "workspaceID": workspace_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workspace_id = d.pop("workspaceID") + + plantypes_terraform_backend = cls( + workspace_id=workspace_id, + ) + + plantypes_terraform_backend.additional_properties = d + return plantypes_terraform_backend + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_build_plan.py b/nuon/models/plantypes_terraform_build_plan.py new file mode 100644 index 00000000..c46064f6 --- /dev/null +++ b/nuon/models/plantypes_terraform_build_plan.py @@ -0,0 +1,72 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_terraform_build_plan_labels import PlantypesTerraformBuildPlanLabels + + +T = TypeVar("T", bound="PlantypesTerraformBuildPlan") + + +@_attrs_define +class PlantypesTerraformBuildPlan: + """ + Attributes: + labels (Union[Unset, PlantypesTerraformBuildPlanLabels]): + """ + + labels: Union[Unset, "PlantypesTerraformBuildPlanLabels"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + labels: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if labels is not UNSET: + field_dict["labels"] = labels + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_terraform_build_plan_labels import PlantypesTerraformBuildPlanLabels + + d = dict(src_dict) + _labels = d.pop("labels", UNSET) + labels: Union[Unset, PlantypesTerraformBuildPlanLabels] + if isinstance(_labels, Unset): + labels = UNSET + else: + labels = PlantypesTerraformBuildPlanLabels.from_dict(_labels) + + plantypes_terraform_build_plan = cls( + labels=labels, + ) + + plantypes_terraform_build_plan.additional_properties = d + return plantypes_terraform_build_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_build_plan_labels.py b/nuon/models/plantypes_terraform_build_plan_labels.py new file mode 100644 index 00000000..b8480c60 --- /dev/null +++ b/nuon/models/plantypes_terraform_build_plan_labels.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesTerraformBuildPlanLabels") + + +@_attrs_define +class PlantypesTerraformBuildPlanLabels: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_terraform_build_plan_labels = cls() + + plantypes_terraform_build_plan_labels.additional_properties = d + return plantypes_terraform_build_plan_labels + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_deploy_hooks.py b/nuon/models/plantypes_terraform_deploy_hooks.py new file mode 100644 index 00000000..1dab00ff --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_hooks.py @@ -0,0 +1,103 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.plantypes_terraform_deploy_hooks_env_vars import PlantypesTerraformDeployHooksEnvVars + + +T = TypeVar("T", bound="PlantypesTerraformDeployHooks") + + +@_attrs_define +class PlantypesTerraformDeployHooks: + """ + Attributes: + enabled (Union[Unset, bool]): + env_vars (Union[Unset, PlantypesTerraformDeployHooksEnvVars]): + run_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + """ + + enabled: Union[Unset, bool] = UNSET + env_vars: Union[Unset, "PlantypesTerraformDeployHooksEnvVars"] = UNSET + run_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + enabled = self.enabled + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + run_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.run_auth, Unset): + run_auth = self.run_auth.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if enabled is not UNSET: + field_dict["enabled"] = enabled + if env_vars is not UNSET: + field_dict["envVars"] = env_vars + if run_auth is not UNSET: + field_dict["runAuth"] = run_auth + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.plantypes_terraform_deploy_hooks_env_vars import PlantypesTerraformDeployHooksEnvVars + + d = dict(src_dict) + enabled = d.pop("enabled", UNSET) + + _env_vars = d.pop("envVars", UNSET) + env_vars: Union[Unset, PlantypesTerraformDeployHooksEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = PlantypesTerraformDeployHooksEnvVars.from_dict(_env_vars) + + _run_auth = d.pop("runAuth", UNSET) + run_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_run_auth, Unset): + run_auth = UNSET + else: + run_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_run_auth) + + plantypes_terraform_deploy_hooks = cls( + enabled=enabled, + env_vars=env_vars, + run_auth=run_auth, + ) + + plantypes_terraform_deploy_hooks.additional_properties = d + return plantypes_terraform_deploy_hooks + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py b/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py new file mode 100644 index 00000000..6924e361 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesTerraformDeployHooksEnvVars") + + +@_attrs_define +class PlantypesTerraformDeployHooksEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_terraform_deploy_hooks_env_vars = cls() + + plantypes_terraform_deploy_hooks_env_vars.additional_properties = d + return plantypes_terraform_deploy_hooks_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_deploy_plan.py b/nuon/models/plantypes_terraform_deploy_plan.py new file mode 100644 index 00000000..f8610814 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan.py @@ -0,0 +1,250 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_deploy_plan_env_vars import PlantypesTerraformDeployPlanEnvVars + from ..models.plantypes_terraform_deploy_plan_policies import PlantypesTerraformDeployPlanPolicies + from ..models.plantypes_terraform_deploy_plan_vars import PlantypesTerraformDeployPlanVars + + +T = TypeVar("T", bound="PlantypesTerraformDeployPlan") + + +@_attrs_define +class PlantypesTerraformDeployPlan: + """ + Attributes: + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + cluster_info (Union[Unset, KubeClusterInfo]): + env_vars (Union[Unset, PlantypesTerraformDeployPlanEnvVars]): + hooks (Union[Unset, PlantypesTerraformDeployHooks]): + plan_json (Union[Unset, list[int]]): + policies (Union[Unset, PlantypesTerraformDeployPlanPolicies]): + state (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState]): + terraform_backend (Union[Unset, PlantypesTerraformBackend]): + vars_ (Union[Unset, PlantypesTerraformDeployPlanVars]): + vars_files (Union[Unset, list[str]]): + """ + + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + env_vars: Union[Unset, "PlantypesTerraformDeployPlanEnvVars"] = UNSET + hooks: Union[Unset, "PlantypesTerraformDeployHooks"] = UNSET + plan_json: Union[Unset, list[int]] = UNSET + policies: Union[Unset, "PlantypesTerraformDeployPlanPolicies"] = UNSET + state: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateState"] = UNSET + terraform_backend: Union[Unset, "PlantypesTerraformBackend"] = UNSET + vars_: Union[Unset, "PlantypesTerraformDeployPlanVars"] = UNSET + vars_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + hooks: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.hooks, Unset): + hooks = self.hooks.to_dict() + + plan_json: Union[Unset, list[int]] = UNSET + if not isinstance(self.plan_json, Unset): + plan_json = self.plan_json + + policies: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.policies, Unset): + policies = self.policies.to_dict() + + state: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + terraform_backend: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_backend, Unset): + terraform_backend = self.terraform_backend.to_dict() + + vars_: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vars_, Unset): + vars_ = self.vars_.to_dict() + + vars_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.vars_files, Unset): + vars_files = self.vars_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if hooks is not UNSET: + field_dict["hooks"] = hooks + if plan_json is not UNSET: + field_dict["plan_json"] = plan_json + if policies is not UNSET: + field_dict["policies"] = policies + if state is not UNSET: + field_dict["state"] = state + if terraform_backend is not UNSET: + field_dict["terraform_backend"] = terraform_backend + if vars_ is not UNSET: + field_dict["vars"] = vars_ + if vars_files is not UNSET: + field_dict["vars_files"] = vars_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_deploy_plan_env_vars import PlantypesTerraformDeployPlanEnvVars + from ..models.plantypes_terraform_deploy_plan_policies import PlantypesTerraformDeployPlanPolicies + from ..models.plantypes_terraform_deploy_plan_vars import PlantypesTerraformDeployPlanVars + + d = dict(src_dict) + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, PlantypesTerraformDeployPlanEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = PlantypesTerraformDeployPlanEnvVars.from_dict(_env_vars) + + _hooks = d.pop("hooks", UNSET) + hooks: Union[Unset, PlantypesTerraformDeployHooks] + if isinstance(_hooks, Unset): + hooks = UNSET + else: + hooks = PlantypesTerraformDeployHooks.from_dict(_hooks) + + plan_json = cast(list[int], d.pop("plan_json", UNSET)) + + _policies = d.pop("policies", UNSET) + policies: Union[Unset, PlantypesTerraformDeployPlanPolicies] + if isinstance(_policies, Unset): + policies = UNSET + else: + policies = PlantypesTerraformDeployPlanPolicies.from_dict(_policies) + + _state = d.pop("state", UNSET) + state: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState] + if isinstance(_state, Unset): + state = UNSET + else: + state = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(_state) + + _terraform_backend = d.pop("terraform_backend", UNSET) + terraform_backend: Union[Unset, PlantypesTerraformBackend] + if isinstance(_terraform_backend, Unset): + terraform_backend = UNSET + else: + terraform_backend = PlantypesTerraformBackend.from_dict(_terraform_backend) + + _vars_ = d.pop("vars", UNSET) + vars_: Union[Unset, PlantypesTerraformDeployPlanVars] + if isinstance(_vars_, Unset): + vars_ = UNSET + else: + vars_ = PlantypesTerraformDeployPlanVars.from_dict(_vars_) + + vars_files = cast(list[str], d.pop("vars_files", UNSET)) + + plantypes_terraform_deploy_plan = cls( + aws_auth=aws_auth, + azure_auth=azure_auth, + cluster_info=cluster_info, + env_vars=env_vars, + hooks=hooks, + plan_json=plan_json, + policies=policies, + state=state, + terraform_backend=terraform_backend, + vars_=vars_, + vars_files=vars_files, + ) + + plantypes_terraform_deploy_plan.additional_properties = d + return plantypes_terraform_deploy_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_deploy_plan_env_vars.py b/nuon/models/plantypes_terraform_deploy_plan_env_vars.py new file mode 100644 index 00000000..20bc3fb1 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesTerraformDeployPlanEnvVars") + + +@_attrs_define +class PlantypesTerraformDeployPlanEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_terraform_deploy_plan_env_vars = cls() + + plantypes_terraform_deploy_plan_env_vars.additional_properties = d + return plantypes_terraform_deploy_plan_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_deploy_plan_policies.py b/nuon/models/plantypes_terraform_deploy_plan_policies.py new file mode 100644 index 00000000..661166b9 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan_policies.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesTerraformDeployPlanPolicies") + + +@_attrs_define +class PlantypesTerraformDeployPlanPolicies: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_terraform_deploy_plan_policies = cls() + + plantypes_terraform_deploy_plan_policies.additional_properties = d + return plantypes_terraform_deploy_plan_policies + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_deploy_plan_vars.py b/nuon/models/plantypes_terraform_deploy_plan_vars.py new file mode 100644 index 00000000..72cc0f46 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlantypesTerraformDeployPlanVars") + + +@_attrs_define +class PlantypesTerraformDeployPlanVars: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plantypes_terraform_deploy_plan_vars = cls() + + plantypes_terraform_deploy_plan_vars.additional_properties = d + return plantypes_terraform_deploy_plan_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_local_archive.py b/nuon/models/plantypes_terraform_local_archive.py new file mode 100644 index 00000000..744b8f10 --- /dev/null +++ b/nuon/models/plantypes_terraform_local_archive.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesTerraformLocalArchive") + + +@_attrs_define +class PlantypesTerraformLocalArchive: + """ + Attributes: + local_archive (Union[Unset, str]): + """ + + local_archive: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + local_archive = self.local_archive + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if local_archive is not UNSET: + field_dict["local_archive"] = local_archive + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + local_archive = d.pop("local_archive", UNSET) + + plantypes_terraform_local_archive = cls( + local_archive=local_archive, + ) + + plantypes_terraform_local_archive.additional_properties = d + return plantypes_terraform_local_archive + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/plantypes_terraform_sandbox_mode.py b/nuon/models/plantypes_terraform_sandbox_mode.py new file mode 100644 index 00000000..cfc178a8 --- /dev/null +++ b/nuon/models/plantypes_terraform_sandbox_mode.py @@ -0,0 +1,88 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesTerraformSandboxMode") + + +@_attrs_define +class PlantypesTerraformSandboxMode: + """ + Attributes: + plan_contents (Union[Unset, str]): create the plan output + plan_display_contents (Union[Unset, str]): + state_json (Union[Unset, list[int]]): needs to be the outputs of `terraform show -json` + workspace_id (Union[Unset, str]): + """ + + plan_contents: Union[Unset, str] = UNSET + plan_display_contents: Union[Unset, str] = UNSET + state_json: Union[Unset, list[int]] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_contents = self.plan_contents + + plan_display_contents = self.plan_display_contents + + state_json: Union[Unset, list[int]] = UNSET + if not isinstance(self.state_json, Unset): + state_json = self.state_json + + workspace_id = self.workspace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_contents is not UNSET: + field_dict["plan_contents"] = plan_contents + if plan_display_contents is not UNSET: + field_dict["plan_display_contents"] = plan_display_contents + if state_json is not UNSET: + field_dict["state_json"] = state_json + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_contents = d.pop("plan_contents", UNSET) + + plan_display_contents = d.pop("plan_display_contents", UNSET) + + state_json = cast(list[int], d.pop("state_json", UNSET)) + + workspace_id = d.pop("workspace_id", UNSET) + + plantypes_terraform_sandbox_mode = cls( + plan_contents=plan_contents, + plan_display_contents=plan_display_contents, + state_json=state_json, + workspace_id=workspace_id, + ) + + plantypes_terraform_sandbox_mode.additional_properties = d + return plantypes_terraform_sandbox_mode + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/refs_ref.py b/nuon/models/refs_ref.py new file mode 100644 index 00000000..280a6759 --- /dev/null +++ b/nuon/models/refs_ref.py @@ -0,0 +1,94 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.refs_ref_type import RefsRefType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RefsRef") + + +@_attrs_define +class RefsRef: + """ + Attributes: + input_ (Union[Unset, str]): + name (Union[Unset, str]): + type_ (Union[Unset, RefsRefType]): + value (Union[Unset, str]): + """ + + input_: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + type_: Union[Unset, RefsRefType] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + input_ = self.input_ + + name = self.name + + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if input_ is not UNSET: + field_dict["input"] = input_ + if name is not UNSET: + field_dict["name"] = name + if type_ is not UNSET: + field_dict["type"] = type_ + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + input_ = d.pop("input", UNSET) + + name = d.pop("name", UNSET) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, RefsRefType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = RefsRefType(_type_) + + value = d.pop("value", UNSET) + + refs_ref = cls( + input_=input_, + name=name, + type_=type_, + value=value, + ) + + refs_ref.additional_properties = d + return refs_ref + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/refs_ref_type.py b/nuon/models/refs_ref_type.py new file mode 100644 index 00000000..1c10602e --- /dev/null +++ b/nuon/models/refs_ref_type.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class RefsRefType(str, Enum): + ACTIONS = "actions" + COMPONENT = "component" + INPUTS = "inputs" + INSTALL_INPUTS = "install_inputs" + INSTALL_STACK = "install_stack" + SANDBOX = "sandbox" + SECRETS = "secrets" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/service_app_awsiam_policy_config.py b/nuon/models/service_app_awsiam_policy_config.py new file mode 100644 index 00000000..1fdb7507 --- /dev/null +++ b/nuon/models/service_app_awsiam_policy_config.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceAppAWSIAMPolicyConfig") + + +@_attrs_define +class ServiceAppAWSIAMPolicyConfig: + """ + Attributes: + contents (Union[Unset, str]): + managed_policy_name (Union[Unset, str]): + name (Union[Unset, str]): + """ + + contents: Union[Unset, str] = UNSET + managed_policy_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + contents = self.contents + + managed_policy_name = self.managed_policy_name + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if managed_policy_name is not UNSET: + field_dict["managed_policy_name"] = managed_policy_name + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + contents = d.pop("contents", UNSET) + + managed_policy_name = d.pop("managed_policy_name", UNSET) + + name = d.pop("name", UNSET) + + service_app_awsiam_policy_config = cls( + contents=contents, + managed_policy_name=managed_policy_name, + name=name, + ) + + service_app_awsiam_policy_config.additional_properties = d + return service_app_awsiam_policy_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_app_awsiam_role_config.py b/nuon/models/service_app_awsiam_role_config.py new file mode 100644 index 00000000..0dca9dc7 --- /dev/null +++ b/nuon/models/service_app_awsiam_role_config.py @@ -0,0 +1,111 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig + + +T = TypeVar("T", bound="ServiceAppAWSIAMRoleConfig") + + +@_attrs_define +class ServiceAppAWSIAMRoleConfig: + """ + Attributes: + description (str): + display_name (str): + name (str): + permissions_boundary (Union[Unset, str]): + policies (Union[Unset, list['ServiceAppAWSIAMPolicyConfig']]): + """ + + description: str + display_name: str + name: str + permissions_boundary: Union[Unset, str] = UNSET + policies: Union[Unset, list["ServiceAppAWSIAMPolicyConfig"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + description = self.description + + display_name = self.display_name + + name = self.name + + permissions_boundary = self.permissions_boundary + + policies: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.policies, Unset): + policies = [] + for policies_item_data in self.policies: + policies_item = policies_item_data.to_dict() + policies.append(policies_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "description": description, + "display_name": display_name, + "name": name, + } + ) + if permissions_boundary is not UNSET: + field_dict["permissions_boundary"] = permissions_boundary + if policies is not UNSET: + field_dict["policies"] = policies + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig + + d = dict(src_dict) + description = d.pop("description") + + display_name = d.pop("display_name") + + name = d.pop("name") + + permissions_boundary = d.pop("permissions_boundary", UNSET) + + policies = [] + _policies = d.pop("policies", UNSET) + for policies_item_data in _policies or []: + policies_item = ServiceAppAWSIAMPolicyConfig.from_dict(policies_item_data) + + policies.append(policies_item) + + service_app_awsiam_role_config = cls( + description=description, + display_name=display_name, + name=name, + permissions_boundary=permissions_boundary, + policies=policies, + ) + + service_app_awsiam_role_config.additional_properties = d + return service_app_awsiam_role_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_app_config_template.py b/nuon/models/service_app_config_template.py new file mode 100644 index 00000000..b93d3d0e --- /dev/null +++ b/nuon/models/service_app_config_template.py @@ -0,0 +1,102 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_app_config_version import AppAppConfigVersion +from ..models.service_app_config_template_type import ServiceAppConfigTemplateType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceAppConfigTemplate") + + +@_attrs_define +class ServiceAppConfigTemplate: + """ + Attributes: + content (Union[Unset, str]): + filename (Union[Unset, str]): + format_ (Union[Unset, AppAppConfigVersion]): + type_ (Union[Unset, ServiceAppConfigTemplateType]): + """ + + content: Union[Unset, str] = UNSET + filename: Union[Unset, str] = UNSET + format_: Union[Unset, AppAppConfigVersion] = UNSET + type_: Union[Unset, ServiceAppConfigTemplateType] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + content = self.content + + filename = self.filename + + format_: Union[Unset, str] = UNSET + if not isinstance(self.format_, Unset): + format_ = self.format_.value + + 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 content is not UNSET: + field_dict["content"] = content + if filename is not UNSET: + field_dict["filename"] = filename + if format_ is not UNSET: + field_dict["format"] = format_ + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + content = d.pop("content", UNSET) + + filename = d.pop("filename", UNSET) + + _format_ = d.pop("format", UNSET) + format_: Union[Unset, AppAppConfigVersion] + if isinstance(_format_, Unset): + format_ = UNSET + else: + format_ = AppAppConfigVersion(_format_) + + _type_ = d.pop("type", UNSET) + type_: Union[Unset, ServiceAppConfigTemplateType] + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ServiceAppConfigTemplateType(_type_) + + service_app_config_template = cls( + content=content, + filename=filename, + format_=format_, + type_=type_, + ) + + service_app_config_template.additional_properties = d + return service_app_config_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_app_config_template_type.py b/nuon/models/service_app_config_template_type.py new file mode 100644 index 00000000..6baed784 --- /dev/null +++ b/nuon/models/service_app_config_template_type.py @@ -0,0 +1,25 @@ +from enum import Enum + + +class ServiceAppConfigTemplateType(str, Enum): + AWS_ECS = "aws-ecs" + AWS_ECS_BYOVPC = "aws-ecs-byovpc" + AWS_EKS = "aws-eks" + AWS_EKS_BYOVPC = "aws-eks-byovpc" + AZURE_AKS = "azure-aks" + CONTAINER_IMAGE = "container-image" + DOCKER_BUILD = "docker-build" + ECR_CONTAINER_IMAGE = "ecr-container-image" + FLAT = "flat" + HELM = "helm" + INPUTS = "inputs" + INSTALLER = "installer" + JOB = "job" + RUNNER = "runner" + SANDBOX = "sandbox" + TERRAFORM = "terraform" + TERRAFORMINFRA = "terraformInfra" + TOP_LEVEL = "top-level" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/service_app_group_request.py b/nuon/models/service_app_group_request.py new file mode 100644 index 00000000..e2937949 --- /dev/null +++ b/nuon/models/service_app_group_request.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceAppGroupRequest") + + +@_attrs_define +class ServiceAppGroupRequest: + """ + Attributes: + description (str): + display_name (str): + index (int): + """ + + description: str + display_name: str + index: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + description = self.description + + display_name = self.display_name + + index = self.index + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "description": description, + "display_name": display_name, + "index": index, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + description = d.pop("description") + + display_name = d.pop("display_name") + + index = d.pop("index") + + service_app_group_request = cls( + description=description, + display_name=display_name, + index=index, + ) + + service_app_group_request.additional_properties = d + return service_app_group_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_app_input_request.py b/nuon/models/service_app_input_request.py new file mode 100644 index 00000000..e474c10c --- /dev/null +++ b/nuon/models/service_app_input_request.py @@ -0,0 +1,130 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceAppInputRequest") + + +@_attrs_define +class ServiceAppInputRequest: + """ + Attributes: + description (str): + display_name (str): + group (str): + index (int): + default (Union[Unset, str]): + internal (Union[Unset, bool]): New, optional fields + required (Union[Unset, bool]): + sensitive (Union[Unset, bool]): + type_ (Union[Unset, str]): + """ + + description: str + display_name: str + group: str + index: int + default: Union[Unset, str] = UNSET + internal: Union[Unset, bool] = UNSET + required: Union[Unset, bool] = UNSET + sensitive: Union[Unset, bool] = UNSET + type_: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + description = self.description + + display_name = self.display_name + + group = self.group + + index = self.index + + default = self.default + + internal = self.internal + + required = self.required + + sensitive = self.sensitive + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "description": description, + "display_name": display_name, + "group": group, + "index": index, + } + ) + if default is not UNSET: + field_dict["default"] = default + if internal is not UNSET: + field_dict["internal"] = internal + if required is not UNSET: + field_dict["required"] = required + if sensitive is not UNSET: + field_dict["sensitive"] = sensitive + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + description = d.pop("description") + + display_name = d.pop("display_name") + + group = d.pop("group") + + index = d.pop("index") + + default = d.pop("default", UNSET) + + internal = d.pop("internal", UNSET) + + required = d.pop("required", UNSET) + + sensitive = d.pop("sensitive", UNSET) + + type_ = d.pop("type", UNSET) + + service_app_input_request = cls( + description=description, + display_name=display_name, + group=group, + index=index, + default=default, + internal=internal, + required=required, + sensitive=sensitive, + type_=type_, + ) + + service_app_input_request.additional_properties = d + return service_app_input_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_app_policy_config.py b/nuon/models/service_app_policy_config.py new file mode 100644 index 00000000..af424da1 --- /dev/null +++ b/nuon/models/service_app_policy_config.py @@ -0,0 +1,69 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.config_app_policy_type import ConfigAppPolicyType + +T = TypeVar("T", bound="ServiceAppPolicyConfig") + + +@_attrs_define +class ServiceAppPolicyConfig: + """ + Attributes: + contents (str): + type_ (ConfigAppPolicyType): + """ + + contents: str + type_: ConfigAppPolicyType + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + contents = self.contents + + type_ = self.type_.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "contents": contents, + "type": type_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + contents = d.pop("contents") + + type_ = ConfigAppPolicyType(d.pop("type")) + + service_app_policy_config = cls( + contents=contents, + type_=type_, + ) + + service_app_policy_config.additional_properties = d + return service_app_policy_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_app_secret_config.py b/nuon/models/service_app_secret_config.py new file mode 100644 index 00000000..ef8072fe --- /dev/null +++ b/nuon/models/service_app_secret_config.py @@ -0,0 +1,140 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceAppSecretConfig") + + +@_attrs_define +class ServiceAppSecretConfig: + """ + Attributes: + description (str): + display_name (str): + name (str): + auto_generate (Union[Unset, bool]): + default (Union[Unset, str]): + format_ (Union[Unset, str]): + kubernetes_secret_name (Union[Unset, str]): + kubernetes_secret_namespace (Union[Unset, str]): + kubernetes_sync (Union[Unset, bool]): + required (Union[Unset, bool]): + """ + + description: str + display_name: str + name: str + auto_generate: Union[Unset, bool] = UNSET + default: Union[Unset, str] = UNSET + format_: Union[Unset, str] = UNSET + kubernetes_secret_name: Union[Unset, str] = UNSET + kubernetes_secret_namespace: Union[Unset, str] = UNSET + kubernetes_sync: Union[Unset, bool] = UNSET + required: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + description = self.description + + display_name = self.display_name + + name = self.name + + auto_generate = self.auto_generate + + default = self.default + + format_ = self.format_ + + kubernetes_secret_name = self.kubernetes_secret_name + + kubernetes_secret_namespace = self.kubernetes_secret_namespace + + kubernetes_sync = self.kubernetes_sync + + required = self.required + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "description": description, + "display_name": display_name, + "name": name, + } + ) + if auto_generate is not UNSET: + field_dict["auto_generate"] = auto_generate + if default is not UNSET: + field_dict["default"] = default + if format_ is not UNSET: + field_dict["format"] = format_ + if kubernetes_secret_name is not UNSET: + field_dict["kubernetes_secret_name"] = kubernetes_secret_name + if kubernetes_secret_namespace is not UNSET: + field_dict["kubernetes_secret_namespace"] = kubernetes_secret_namespace + if kubernetes_sync is not UNSET: + field_dict["kubernetes_sync"] = kubernetes_sync + if required is not UNSET: + field_dict["required"] = required + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + description = d.pop("description") + + display_name = d.pop("display_name") + + name = d.pop("name") + + auto_generate = d.pop("auto_generate", UNSET) + + default = d.pop("default", UNSET) + + format_ = d.pop("format", UNSET) + + kubernetes_secret_name = d.pop("kubernetes_secret_name", UNSET) + + kubernetes_secret_namespace = d.pop("kubernetes_secret_namespace", UNSET) + + kubernetes_sync = d.pop("kubernetes_sync", UNSET) + + required = d.pop("required", UNSET) + + service_app_secret_config = cls( + description=description, + display_name=display_name, + name=name, + auto_generate=auto_generate, + default=default, + format_=format_, + kubernetes_secret_name=kubernetes_secret_name, + kubernetes_secret_namespace=kubernetes_secret_namespace, + kubernetes_sync=kubernetes_sync, + required=required, + ) + + service_app_secret_config.additional_properties = d + return service_app_secret_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_aws_ecr_image_config_request.py b/nuon/models/service_aws_ecr_image_config_request.py new file mode 100644 index 00000000..56859d38 --- /dev/null +++ b/nuon/models/service_aws_ecr_image_config_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceAwsECRImageConfigRequest") + + +@_attrs_define +class ServiceAwsECRImageConfigRequest: + """ + Attributes: + aws_region (Union[Unset, str]): + iam_role_arn (Union[Unset, str]): + """ + + aws_region: Union[Unset, str] = UNSET + iam_role_arn: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_region = self.aws_region + + iam_role_arn = self.iam_role_arn + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_region is not UNSET: + field_dict["aws_region"] = aws_region + if iam_role_arn is not UNSET: + field_dict["iam_role_arn"] = iam_role_arn + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + aws_region = d.pop("aws_region", UNSET) + + iam_role_arn = d.pop("iam_role_arn", UNSET) + + service_aws_ecr_image_config_request = cls( + aws_region=aws_region, + iam_role_arn=iam_role_arn, + ) + + service_aws_ecr_image_config_request.additional_properties = d + return service_aws_ecr_image_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_build_all_components_request.py b/nuon/models/service_build_all_components_request.py new file mode 100644 index 00000000..1b563545 --- /dev/null +++ b/nuon/models/service_build_all_components_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceBuildAllComponentsRequest") + + +@_attrs_define +class ServiceBuildAllComponentsRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_build_all_components_request = cls() + + service_build_all_components_request.additional_properties = d + return service_build_all_components_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_cancel_runner_job_request.py b/nuon/models/service_cancel_runner_job_request.py new file mode 100644 index 00000000..91ad5557 --- /dev/null +++ b/nuon/models/service_cancel_runner_job_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCancelRunnerJobRequest") + + +@_attrs_define +class ServiceCancelRunnerJobRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_cancel_runner_job_request = cls() + + service_cancel_runner_job_request.additional_properties = d + return service_cancel_runner_job_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_cli_config.py b/nuon/models/service_cli_config.py new file mode 100644 index 00000000..130a8f3a --- /dev/null +++ b/nuon/models/service_cli_config.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCLIConfig") + + +@_attrs_define +class ServiceCLIConfig: + """ + Attributes: + auth_audience (Union[Unset, str]): + auth_client_id (Union[Unset, str]): + auth_domain (Union[Unset, str]): + dashboard_url (Union[Unset, str]): + """ + + auth_audience: Union[Unset, str] = UNSET + auth_client_id: Union[Unset, str] = UNSET + auth_domain: Union[Unset, str] = UNSET + dashboard_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auth_audience = self.auth_audience + + auth_client_id = self.auth_client_id + + auth_domain = self.auth_domain + + dashboard_url = self.dashboard_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_audience is not UNSET: + field_dict["auth_audience"] = auth_audience + if auth_client_id is not UNSET: + field_dict["auth_client_id"] = auth_client_id + if auth_domain is not UNSET: + field_dict["auth_domain"] = auth_domain + if dashboard_url is not UNSET: + field_dict["dashboard_url"] = dashboard_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + auth_audience = d.pop("auth_audience", UNSET) + + auth_client_id = d.pop("auth_client_id", UNSET) + + auth_domain = d.pop("auth_domain", UNSET) + + dashboard_url = d.pop("dashboard_url", UNSET) + + service_cli_config = cls( + auth_audience=auth_audience, + auth_client_id=auth_client_id, + auth_domain=auth_domain, + dashboard_url=dashboard_url, + ) + + service_cli_config.additional_properties = d + return service_cli_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_component_children.py b/nuon/models/service_component_children.py new file mode 100644 index 00000000..39be8271 --- /dev/null +++ b/nuon/models/service_component_children.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_component import AppComponent + + +T = TypeVar("T", bound="ServiceComponentChildren") + + +@_attrs_define +class ServiceComponentChildren: + """ + Attributes: + children (Union[Unset, list['AppComponent']]): + """ + + children: Union[Unset, list["AppComponent"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + children: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.children, Unset): + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if children is not UNSET: + field_dict["children"] = children + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_component import AppComponent + + d = dict(src_dict) + children = [] + _children = d.pop("children", UNSET) + for children_item_data in _children or []: + children_item = AppComponent.from_dict(children_item_data) + + children.append(children_item) + + service_component_children = cls( + children=children, + ) + + service_component_children.additional_properties = d + return service_component_children + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_connected_github_vcs_action_workflow_config_request.py b/nuon/models/service_connected_github_vcs_action_workflow_config_request.py new file mode 100644 index 00000000..137abd97 --- /dev/null +++ b/nuon/models/service_connected_github_vcs_action_workflow_config_request.py @@ -0,0 +1,87 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceConnectedGithubVCSActionWorkflowConfigRequest") + + +@_attrs_define +class ServiceConnectedGithubVCSActionWorkflowConfigRequest: + """ + Attributes: + directory (str): + repo (str): + branch (Union[Unset, str]): + git_ref (Union[Unset, str]): + """ + + directory: str + repo: str + branch: Union[Unset, str] = UNSET + git_ref: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + directory = self.directory + + repo = self.repo + + branch = self.branch + + git_ref = self.git_ref + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "directory": directory, + "repo": repo, + } + ) + if branch is not UNSET: + field_dict["branch"] = branch + if git_ref is not UNSET: + field_dict["gitRef"] = git_ref + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + directory = d.pop("directory") + + repo = d.pop("repo") + + branch = d.pop("branch", UNSET) + + git_ref = d.pop("gitRef", UNSET) + + service_connected_github_vcs_action_workflow_config_request = cls( + directory=directory, + repo=repo, + branch=branch, + git_ref=git_ref, + ) + + service_connected_github_vcs_action_workflow_config_request.additional_properties = d + return service_connected_github_vcs_action_workflow_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_connected_github_vcs_config_request.py b/nuon/models/service_connected_github_vcs_config_request.py new file mode 100644 index 00000000..ffa61a0c --- /dev/null +++ b/nuon/models/service_connected_github_vcs_config_request.py @@ -0,0 +1,87 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceConnectedGithubVCSConfigRequest") + + +@_attrs_define +class ServiceConnectedGithubVCSConfigRequest: + """ + Attributes: + directory (str): + repo (str): + branch (Union[Unset, str]): + git_ref (Union[Unset, str]): + """ + + directory: str + repo: str + branch: Union[Unset, str] = UNSET + git_ref: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + directory = self.directory + + repo = self.repo + + branch = self.branch + + git_ref = self.git_ref + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "directory": directory, + "repo": repo, + } + ) + if branch is not UNSET: + field_dict["branch"] = branch + if git_ref is not UNSET: + field_dict["gitRef"] = git_ref + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + directory = d.pop("directory") + + repo = d.pop("repo") + + branch = d.pop("branch", UNSET) + + git_ref = d.pop("gitRef", UNSET) + + service_connected_github_vcs_config_request = cls( + directory=directory, + repo=repo, + branch=branch, + git_ref=git_ref, + ) + + service_connected_github_vcs_config_request.additional_properties = d + return service_connected_github_vcs_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_connected_github_vcs_sandbox_config_request.py b/nuon/models/service_connected_github_vcs_sandbox_config_request.py new file mode 100644 index 00000000..a39543e5 --- /dev/null +++ b/nuon/models/service_connected_github_vcs_sandbox_config_request.py @@ -0,0 +1,87 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceConnectedGithubVCSSandboxConfigRequest") + + +@_attrs_define +class ServiceConnectedGithubVCSSandboxConfigRequest: + """ + Attributes: + directory (str): + repo (str): + branch (Union[Unset, str]): + git_ref (Union[Unset, str]): + """ + + directory: str + repo: str + branch: Union[Unset, str] = UNSET + git_ref: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + directory = self.directory + + repo = self.repo + + branch = self.branch + + git_ref = self.git_ref + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "directory": directory, + "repo": repo, + } + ) + if branch is not UNSET: + field_dict["branch"] = branch + if git_ref is not UNSET: + field_dict["gitRef"] = git_ref + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + directory = d.pop("directory") + + repo = d.pop("repo") + + branch = d.pop("branch", UNSET) + + git_ref = d.pop("gitRef", UNSET) + + service_connected_github_vcs_sandbox_config_request = cls( + directory=directory, + repo=repo, + branch=branch, + git_ref=git_ref, + ) + + service_connected_github_vcs_sandbox_config_request.additional_properties = d + return service_connected_github_vcs_sandbox_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_request.py b/nuon/models/service_create_action_workflow_config_request.py new file mode 100644 index 00000000..125de9f6 --- /dev/null +++ b/nuon/models/service_create_action_workflow_config_request.py @@ -0,0 +1,147 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_action_workflow_config_step_request import ServiceCreateActionWorkflowConfigStepRequest + from ..models.service_create_action_workflow_config_trigger_request import ( + ServiceCreateActionWorkflowConfigTriggerRequest, + ) + + +T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigRequest") + + +@_attrs_define +class ServiceCreateActionWorkflowConfigRequest: + """ + Attributes: + app_config_id (str): + steps (list['ServiceCreateActionWorkflowConfigStepRequest']): + triggers (list['ServiceCreateActionWorkflowConfigTriggerRequest']): + break_glass_role_arn (Union[Unset, str]): + dependencies (Union[Unset, list[str]]): + references (Union[Unset, list[str]]): + timeout (Union[Unset, int]): + """ + + app_config_id: str + steps: list["ServiceCreateActionWorkflowConfigStepRequest"] + triggers: list["ServiceCreateActionWorkflowConfigTriggerRequest"] + break_glass_role_arn: Union[Unset, str] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + references: Union[Unset, list[str]] = UNSET + timeout: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + triggers = [] + for triggers_item_data in self.triggers: + triggers_item = triggers_item_data.to_dict() + triggers.append(triggers_item) + + break_glass_role_arn = self.break_glass_role_arn + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + timeout = self.timeout + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_config_id": app_config_id, + "steps": steps, + "triggers": triggers, + } + ) + if break_glass_role_arn is not UNSET: + field_dict["break_glass_role_arn"] = break_glass_role_arn + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if references is not UNSET: + field_dict["references"] = references + if timeout is not UNSET: + field_dict["timeout"] = timeout + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_action_workflow_config_step_request import ( + ServiceCreateActionWorkflowConfigStepRequest, + ) + from ..models.service_create_action_workflow_config_trigger_request import ( + ServiceCreateActionWorkflowConfigTriggerRequest, + ) + + d = dict(src_dict) + app_config_id = d.pop("app_config_id") + + steps = [] + _steps = d.pop("steps") + for steps_item_data in _steps: + steps_item = ServiceCreateActionWorkflowConfigStepRequest.from_dict(steps_item_data) + + steps.append(steps_item) + + triggers = [] + _triggers = d.pop("triggers") + for triggers_item_data in _triggers: + triggers_item = ServiceCreateActionWorkflowConfigTriggerRequest.from_dict(triggers_item_data) + + triggers.append(triggers_item) + + break_glass_role_arn = d.pop("break_glass_role_arn", UNSET) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + references = cast(list[str], d.pop("references", UNSET)) + + timeout = d.pop("timeout", UNSET) + + service_create_action_workflow_config_request = cls( + app_config_id=app_config_id, + steps=steps, + triggers=triggers, + break_glass_role_arn=break_glass_role_arn, + dependencies=dependencies, + references=references, + timeout=timeout, + ) + + service_create_action_workflow_config_request.additional_properties = d + return service_create_action_workflow_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_step_request.py b/nuon/models/service_create_action_workflow_config_step_request.py new file mode 100644 index 00000000..629e7468 --- /dev/null +++ b/nuon/models/service_create_action_workflow_config_step_request.py @@ -0,0 +1,162 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_connected_github_vcs_action_workflow_config_request import ( + ServiceConnectedGithubVCSActionWorkflowConfigRequest, + ) + from ..models.service_create_action_workflow_config_step_request_env_vars import ( + ServiceCreateActionWorkflowConfigStepRequestEnvVars, + ) + from ..models.service_public_git_vcs_action_workflow_config_request import ( + ServicePublicGitVCSActionWorkflowConfigRequest, + ) + + +T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigStepRequest") + + +@_attrs_define +class ServiceCreateActionWorkflowConfigStepRequest: + """ + Attributes: + name (str): + command (Union[Unset, str]): + connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSActionWorkflowConfigRequest]): + env_vars (Union[Unset, ServiceCreateActionWorkflowConfigStepRequestEnvVars]): + inline_contents (Union[Unset, str]): + public_git_vcs_config (Union[Unset, ServicePublicGitVCSActionWorkflowConfigRequest]): + references (Union[Unset, list[str]]): + """ + + name: str + command: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSActionWorkflowConfigRequest"] = UNSET + env_vars: Union[Unset, "ServiceCreateActionWorkflowConfigStepRequestEnvVars"] = UNSET + inline_contents: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "ServicePublicGitVCSActionWorkflowConfigRequest"] = UNSET + references: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + command = self.command + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + inline_contents = self.inline_contents + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if command is not UNSET: + field_dict["command"] = command + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if inline_contents is not UNSET: + field_dict["inline_contents"] = inline_contents + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_connected_github_vcs_action_workflow_config_request import ( + ServiceConnectedGithubVCSActionWorkflowConfigRequest, + ) + from ..models.service_create_action_workflow_config_step_request_env_vars import ( + ServiceCreateActionWorkflowConfigStepRequestEnvVars, + ) + from ..models.service_public_git_vcs_action_workflow_config_request import ( + ServicePublicGitVCSActionWorkflowConfigRequest, + ) + + d = dict(src_dict) + name = d.pop("name") + + command = d.pop("command", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSActionWorkflowConfigRequest] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = ServiceConnectedGithubVCSActionWorkflowConfigRequest.from_dict( + _connected_github_vcs_config + ) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, ServiceCreateActionWorkflowConfigStepRequestEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = ServiceCreateActionWorkflowConfigStepRequestEnvVars.from_dict(_env_vars) + + inline_contents = d.pop("inline_contents", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, ServicePublicGitVCSActionWorkflowConfigRequest] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = ServicePublicGitVCSActionWorkflowConfigRequest.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + service_create_action_workflow_config_step_request = cls( + name=name, + command=command, + connected_github_vcs_config=connected_github_vcs_config, + env_vars=env_vars, + inline_contents=inline_contents, + public_git_vcs_config=public_git_vcs_config, + references=references, + ) + + service_create_action_workflow_config_step_request.additional_properties = d + return service_create_action_workflow_config_step_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_step_request_env_vars.py b/nuon/models/service_create_action_workflow_config_step_request_env_vars.py new file mode 100644 index 00000000..43535a25 --- /dev/null +++ b/nuon/models/service_create_action_workflow_config_step_request_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigStepRequestEnvVars") + + +@_attrs_define +class ServiceCreateActionWorkflowConfigStepRequestEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_action_workflow_config_step_request_env_vars = cls() + + service_create_action_workflow_config_step_request_env_vars.additional_properties = d + return service_create_action_workflow_config_step_request_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_action_workflow_config_trigger_request.py b/nuon/models/service_create_action_workflow_config_trigger_request.py new file mode 100644 index 00000000..ce7aaa7a --- /dev/null +++ b/nuon/models/service_create_action_workflow_config_trigger_request.py @@ -0,0 +1,89 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_action_workflow_trigger_type import AppActionWorkflowTriggerType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateActionWorkflowConfigTriggerRequest") + + +@_attrs_define +class ServiceCreateActionWorkflowConfigTriggerRequest: + """ + Attributes: + type_ (AppActionWorkflowTriggerType): + component_name (Union[Unset, str]): + cron_schedule (Union[Unset, str]): + index (Union[Unset, int]): + """ + + type_: AppActionWorkflowTriggerType + component_name: Union[Unset, str] = UNSET + cron_schedule: Union[Unset, str] = UNSET + index: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_ = self.type_.value + + component_name = self.component_name + + cron_schedule = self.cron_schedule + + index = self.index + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + } + ) + if component_name is not UNSET: + field_dict["component_name"] = component_name + if cron_schedule is not UNSET: + field_dict["cron_schedule"] = cron_schedule + if index is not UNSET: + field_dict["index"] = index + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = AppActionWorkflowTriggerType(d.pop("type")) + + component_name = d.pop("component_name", UNSET) + + cron_schedule = d.pop("cron_schedule", UNSET) + + index = d.pop("index", UNSET) + + service_create_action_workflow_config_trigger_request = cls( + type_=type_, + component_name=component_name, + cron_schedule=cron_schedule, + index=index, + ) + + service_create_action_workflow_config_trigger_request.additional_properties = d + return service_create_action_workflow_config_trigger_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_action_request.py b/nuon/models/service_create_app_action_request.py new file mode 100644 index 00000000..e440a42f --- /dev/null +++ b/nuon/models/service_create_app_action_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateAppActionRequest") + + +@_attrs_define +class ServiceCreateAppActionRequest: + """ + Attributes: + name (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + service_create_app_action_request = cls( + name=name, + ) + + service_create_app_action_request.additional_properties = d + return service_create_app_action_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_action_workflow_request.py b/nuon/models/service_create_app_action_workflow_request.py new file mode 100644 index 00000000..db06267a --- /dev/null +++ b/nuon/models/service_create_app_action_workflow_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateAppActionWorkflowRequest") + + +@_attrs_define +class ServiceCreateAppActionWorkflowRequest: + """ + Attributes: + name (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + service_create_app_action_workflow_request = cls( + name=name, + ) + + service_create_app_action_workflow_request.additional_properties = d + return service_create_app_action_workflow_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_branch_request.py b/nuon/models/service_create_app_branch_request.py new file mode 100644 index 00000000..839a6a2b --- /dev/null +++ b/nuon/models/service_create_app_branch_request.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateAppBranchRequest") + + +@_attrs_define +class ServiceCreateAppBranchRequest: + """ + Attributes: + connected_github_vcs_config_id (str): + name (str): + """ + + connected_github_vcs_config_id: str + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + connected_github_vcs_config_id = self.connected_github_vcs_config_id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "connected_github_vcs_config_id": connected_github_vcs_config_id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + connected_github_vcs_config_id = d.pop("connected_github_vcs_config_id") + + name = d.pop("name") + + service_create_app_branch_request = cls( + connected_github_vcs_config_id=connected_github_vcs_config_id, + name=name, + ) + + service_create_app_branch_request.additional_properties = d + return service_create_app_branch_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_break_glass_config_request.py b/nuon/models/service_create_app_break_glass_config_request.py new file mode 100644 index 00000000..cda794f9 --- /dev/null +++ b/nuon/models/service_create_app_break_glass_config_request.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig + + +T = TypeVar("T", bound="ServiceCreateAppBreakGlassConfigRequest") + + +@_attrs_define +class ServiceCreateAppBreakGlassConfigRequest: + """ + Attributes: + app_config_id (str): + roles (list['ServiceAppAWSIAMRoleConfig']): + """ + + app_config_id: str + roles: list["ServiceAppAWSIAMRoleConfig"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + roles = [] + for roles_item_data in self.roles: + roles_item = roles_item_data.to_dict() + roles.append(roles_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_config_id": app_config_id, + "roles": roles, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id") + + roles = [] + _roles = d.pop("roles") + for roles_item_data in _roles: + roles_item = ServiceAppAWSIAMRoleConfig.from_dict(roles_item_data) + + roles.append(roles_item) + + service_create_app_break_glass_config_request = cls( + app_config_id=app_config_id, + roles=roles, + ) + + service_create_app_break_glass_config_request.additional_properties = d + return service_create_app_break_glass_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_config_request.py b/nuon/models/service_create_app_config_request.py new file mode 100644 index 00000000..ffe181ea --- /dev/null +++ b/nuon/models/service_create_app_config_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateAppConfigRequest") + + +@_attrs_define +class ServiceCreateAppConfigRequest: + """ + Attributes: + cli_version (Union[Unset, str]): + readme (Union[Unset, str]): not required Readme + """ + + cli_version: Union[Unset, str] = UNSET + readme: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cli_version = self.cli_version + + readme = self.readme + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cli_version is not UNSET: + field_dict["cli_version"] = cli_version + if readme is not UNSET: + field_dict["readme"] = readme + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + cli_version = d.pop("cli_version", UNSET) + + readme = d.pop("readme", UNSET) + + service_create_app_config_request = cls( + cli_version=cli_version, + readme=readme, + ) + + service_create_app_config_request.additional_properties = d + return service_create_app_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_input_config_request.py b/nuon/models/service_create_app_input_config_request.py new file mode 100644 index 00000000..d0e0bf4e --- /dev/null +++ b/nuon/models/service_create_app_input_config_request.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_app_input_config_request_groups import ServiceCreateAppInputConfigRequestGroups + from ..models.service_create_app_input_config_request_inputs import ServiceCreateAppInputConfigRequestInputs + + +T = TypeVar("T", bound="ServiceCreateAppInputConfigRequest") + + +@_attrs_define +class ServiceCreateAppInputConfigRequest: + """ + Attributes: + groups (ServiceCreateAppInputConfigRequestGroups): + inputs (ServiceCreateAppInputConfigRequestInputs): + app_config_id (Union[Unset, str]): + """ + + groups: "ServiceCreateAppInputConfigRequestGroups" + inputs: "ServiceCreateAppInputConfigRequestInputs" + app_config_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + groups = self.groups.to_dict() + + inputs = self.inputs.to_dict() + + app_config_id = self.app_config_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "groups": groups, + "inputs": inputs, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_app_input_config_request_groups import ServiceCreateAppInputConfigRequestGroups + from ..models.service_create_app_input_config_request_inputs import ServiceCreateAppInputConfigRequestInputs + + d = dict(src_dict) + groups = ServiceCreateAppInputConfigRequestGroups.from_dict(d.pop("groups")) + + inputs = ServiceCreateAppInputConfigRequestInputs.from_dict(d.pop("inputs")) + + app_config_id = d.pop("app_config_id", UNSET) + + service_create_app_input_config_request = cls( + groups=groups, + inputs=inputs, + app_config_id=app_config_id, + ) + + service_create_app_input_config_request.additional_properties = d + return service_create_app_input_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_input_config_request_groups.py b/nuon/models/service_create_app_input_config_request_groups.py new file mode 100644 index 00000000..d005b63d --- /dev/null +++ b/nuon/models/service_create_app_input_config_request_groups.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_app_group_request import ServiceAppGroupRequest + + +T = TypeVar("T", bound="ServiceCreateAppInputConfigRequestGroups") + + +@_attrs_define +class ServiceCreateAppInputConfigRequestGroups: + """ """ + + additional_properties: dict[str, "ServiceAppGroupRequest"] = _attrs_field(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(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_group_request import ServiceAppGroupRequest + + d = dict(src_dict) + service_create_app_input_config_request_groups = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ServiceAppGroupRequest.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + service_create_app_input_config_request_groups.additional_properties = additional_properties + return service_create_app_input_config_request_groups + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "ServiceAppGroupRequest": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "ServiceAppGroupRequest") -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_input_config_request_inputs.py b/nuon/models/service_create_app_input_config_request_inputs.py new file mode 100644 index 00000000..71f40ed1 --- /dev/null +++ b/nuon/models/service_create_app_input_config_request_inputs.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_app_input_request import ServiceAppInputRequest + + +T = TypeVar("T", bound="ServiceCreateAppInputConfigRequestInputs") + + +@_attrs_define +class ServiceCreateAppInputConfigRequestInputs: + """ """ + + additional_properties: dict[str, "ServiceAppInputRequest"] = _attrs_field(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(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_input_request import ServiceAppInputRequest + + d = dict(src_dict) + service_create_app_input_config_request_inputs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ServiceAppInputRequest.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + service_create_app_input_config_request_inputs.additional_properties = additional_properties + return service_create_app_input_config_request_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "ServiceAppInputRequest": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "ServiceAppInputRequest") -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_permissions_config_request.py b/nuon/models/service_create_app_permissions_config_request.py new file mode 100644 index 00000000..fc532d8a --- /dev/null +++ b/nuon/models/service_create_app_permissions_config_request.py @@ -0,0 +1,110 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig + + +T = TypeVar("T", bound="ServiceCreateAppPermissionsConfigRequest") + + +@_attrs_define +class ServiceCreateAppPermissionsConfigRequest: + """ + Attributes: + app_config_id (str): + deprovision_role (ServiceAppAWSIAMRoleConfig): + maintenance_role (ServiceAppAWSIAMRoleConfig): + provision_role (ServiceAppAWSIAMRoleConfig): + break_glass_roles (Union[Unset, list['ServiceAppAWSIAMRoleConfig']]): + """ + + app_config_id: str + deprovision_role: "ServiceAppAWSIAMRoleConfig" + maintenance_role: "ServiceAppAWSIAMRoleConfig" + provision_role: "ServiceAppAWSIAMRoleConfig" + break_glass_roles: Union[Unset, list["ServiceAppAWSIAMRoleConfig"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + deprovision_role = self.deprovision_role.to_dict() + + maintenance_role = self.maintenance_role.to_dict() + + provision_role = self.provision_role.to_dict() + + break_glass_roles: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.break_glass_roles, Unset): + break_glass_roles = [] + for break_glass_roles_item_data in self.break_glass_roles: + break_glass_roles_item = break_glass_roles_item_data.to_dict() + break_glass_roles.append(break_glass_roles_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_config_id": app_config_id, + "deprovision_role": deprovision_role, + "maintenance_role": maintenance_role, + "provision_role": provision_role, + } + ) + if break_glass_roles is not UNSET: + field_dict["break_glass_roles"] = break_glass_roles + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id") + + deprovision_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("deprovision_role")) + + maintenance_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("maintenance_role")) + + provision_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("provision_role")) + + break_glass_roles = [] + _break_glass_roles = d.pop("break_glass_roles", UNSET) + for break_glass_roles_item_data in _break_glass_roles or []: + break_glass_roles_item = ServiceAppAWSIAMRoleConfig.from_dict(break_glass_roles_item_data) + + break_glass_roles.append(break_glass_roles_item) + + service_create_app_permissions_config_request = cls( + app_config_id=app_config_id, + deprovision_role=deprovision_role, + maintenance_role=maintenance_role, + provision_role=provision_role, + break_glass_roles=break_glass_roles, + ) + + service_create_app_permissions_config_request.additional_properties = d + return service_create_app_permissions_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_policies_config_request.py b/nuon/models/service_create_app_policies_config_request.py new file mode 100644 index 00000000..692dd09b --- /dev/null +++ b/nuon/models/service_create_app_policies_config_request.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_app_policy_config import ServiceAppPolicyConfig + + +T = TypeVar("T", bound="ServiceCreateAppPoliciesConfigRequest") + + +@_attrs_define +class ServiceCreateAppPoliciesConfigRequest: + """ + Attributes: + app_config_id (str): + policies (Union[Unset, list['ServiceAppPolicyConfig']]): + """ + + app_config_id: str + policies: Union[Unset, list["ServiceAppPolicyConfig"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + policies: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.policies, Unset): + policies = [] + for policies_item_data in self.policies: + policies_item = policies_item_data.to_dict() + policies.append(policies_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_config_id": app_config_id, + } + ) + if policies is not UNSET: + field_dict["policies"] = policies + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_policy_config import ServiceAppPolicyConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id") + + policies = [] + _policies = d.pop("policies", UNSET) + for policies_item_data in _policies or []: + policies_item = ServiceAppPolicyConfig.from_dict(policies_item_data) + + policies.append(policies_item) + + service_create_app_policies_config_request = cls( + app_config_id=app_config_id, + policies=policies, + ) + + service_create_app_policies_config_request.additional_properties = d + return service_create_app_policies_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_request.py b/nuon/models/service_create_app_request.py new file mode 100644 index 00000000..38e64111 --- /dev/null +++ b/nuon/models/service_create_app_request.py @@ -0,0 +1,88 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateAppRequest") + + +@_attrs_define +class ServiceCreateAppRequest: + """ + Attributes: + name (str): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + slack_webhook_url (Union[Unset, str]): + """ + + name: str + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + slack_webhook_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description = self.description + + display_name = self.display_name + + slack_webhook_url = self.slack_webhook_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if slack_webhook_url is not UNSET: + field_dict["slack_webhook_url"] = slack_webhook_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + slack_webhook_url = d.pop("slack_webhook_url", UNSET) + + service_create_app_request = cls( + name=name, + description=description, + display_name=display_name, + slack_webhook_url=slack_webhook_url, + ) + + service_create_app_request.additional_properties = d + return service_create_app_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_runner_config_request.py b/nuon/models/service_create_app_runner_config_request.py new file mode 100644 index 00000000..799905d9 --- /dev/null +++ b/nuon/models/service_create_app_runner_config_request.py @@ -0,0 +1,121 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_app_runner_config_helm_driver_type import AppAppRunnerConfigHelmDriverType +from ..models.app_app_runner_type import AppAppRunnerType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_app_runner_config_request_env_vars import ServiceCreateAppRunnerConfigRequestEnvVars + + +T = TypeVar("T", bound="ServiceCreateAppRunnerConfigRequest") + + +@_attrs_define +class ServiceCreateAppRunnerConfigRequest: + """ + Attributes: + type_ (AppAppRunnerType): + app_config_id (Union[Unset, str]): + env_vars (Union[Unset, ServiceCreateAppRunnerConfigRequestEnvVars]): + helm_driver (Union[Unset, AppAppRunnerConfigHelmDriverType]): + init_script_url (Union[Unset, str]): + """ + + type_: AppAppRunnerType + app_config_id: Union[Unset, str] = UNSET + env_vars: Union[Unset, "ServiceCreateAppRunnerConfigRequestEnvVars"] = UNSET + helm_driver: Union[Unset, AppAppRunnerConfigHelmDriverType] = UNSET + init_script_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_ = self.type_.value + + app_config_id = self.app_config_id + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + helm_driver: Union[Unset, str] = UNSET + if not isinstance(self.helm_driver, Unset): + helm_driver = self.helm_driver.value + + init_script_url = self.init_script_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if helm_driver is not UNSET: + field_dict["helm_driver"] = helm_driver + if init_script_url is not UNSET: + field_dict["init_script_url"] = init_script_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_app_runner_config_request_env_vars import ( + ServiceCreateAppRunnerConfigRequestEnvVars, + ) + + d = dict(src_dict) + type_ = AppAppRunnerType(d.pop("type")) + + app_config_id = d.pop("app_config_id", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, ServiceCreateAppRunnerConfigRequestEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = ServiceCreateAppRunnerConfigRequestEnvVars.from_dict(_env_vars) + + _helm_driver = d.pop("helm_driver", UNSET) + helm_driver: Union[Unset, AppAppRunnerConfigHelmDriverType] + if isinstance(_helm_driver, Unset): + helm_driver = UNSET + else: + helm_driver = AppAppRunnerConfigHelmDriverType(_helm_driver) + + init_script_url = d.pop("init_script_url", UNSET) + + service_create_app_runner_config_request = cls( + type_=type_, + app_config_id=app_config_id, + env_vars=env_vars, + helm_driver=helm_driver, + init_script_url=init_script_url, + ) + + service_create_app_runner_config_request.additional_properties = d + return service_create_app_runner_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_runner_config_request_env_vars.py b/nuon/models/service_create_app_runner_config_request_env_vars.py new file mode 100644 index 00000000..f5098f78 --- /dev/null +++ b/nuon/models/service_create_app_runner_config_request_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateAppRunnerConfigRequestEnvVars") + + +@_attrs_define +class ServiceCreateAppRunnerConfigRequestEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_app_runner_config_request_env_vars = cls() + + service_create_app_runner_config_request_env_vars.additional_properties = d + return service_create_app_runner_config_request_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_sandbox_config_request.py b/nuon/models/service_create_app_sandbox_config_request.py new file mode 100644 index 00000000..3dd72c26 --- /dev/null +++ b/nuon/models/service_create_app_sandbox_config_request.py @@ -0,0 +1,173 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_connected_github_vcs_sandbox_config_request import ( + ServiceConnectedGithubVCSSandboxConfigRequest, + ) + from ..models.service_create_app_sandbox_config_request_env_vars import ServiceCreateAppSandboxConfigRequestEnvVars + from ..models.service_create_app_sandbox_config_request_variables import ( + ServiceCreateAppSandboxConfigRequestVariables, + ) + from ..models.service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest + + +T = TypeVar("T", bound="ServiceCreateAppSandboxConfigRequest") + + +@_attrs_define +class ServiceCreateAppSandboxConfigRequest: + """ + Attributes: + env_vars (ServiceCreateAppSandboxConfigRequestEnvVars): + terraform_version (str): + variables (ServiceCreateAppSandboxConfigRequestVariables): + app_config_id (Union[Unset, str]): + connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSSandboxConfigRequest]): + drift_schedule (Union[Unset, str]): + public_git_vcs_config (Union[Unset, ServicePublicGitVCSSandboxConfigRequest]): + references (Union[Unset, list[str]]): + variables_files (Union[Unset, list[str]]): + """ + + env_vars: "ServiceCreateAppSandboxConfigRequestEnvVars" + terraform_version: str + variables: "ServiceCreateAppSandboxConfigRequestVariables" + app_config_id: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSSandboxConfigRequest"] = UNSET + drift_schedule: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "ServicePublicGitVCSSandboxConfigRequest"] = UNSET + references: Union[Unset, list[str]] = UNSET + variables_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + env_vars = self.env_vars.to_dict() + + terraform_version = self.terraform_version + + variables = self.variables.to_dict() + + app_config_id = self.app_config_id + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + drift_schedule = self.drift_schedule + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + variables_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.variables_files, Unset): + variables_files = self.variables_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "env_vars": env_vars, + "terraform_version": terraform_version, + "variables": variables, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if variables_files is not UNSET: + field_dict["variables_files"] = variables_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_connected_github_vcs_sandbox_config_request import ( + ServiceConnectedGithubVCSSandboxConfigRequest, + ) + from ..models.service_create_app_sandbox_config_request_env_vars import ( + ServiceCreateAppSandboxConfigRequestEnvVars, + ) + from ..models.service_create_app_sandbox_config_request_variables import ( + ServiceCreateAppSandboxConfigRequestVariables, + ) + from ..models.service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest + + d = dict(src_dict) + env_vars = ServiceCreateAppSandboxConfigRequestEnvVars.from_dict(d.pop("env_vars")) + + terraform_version = d.pop("terraform_version") + + variables = ServiceCreateAppSandboxConfigRequestVariables.from_dict(d.pop("variables")) + + app_config_id = d.pop("app_config_id", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSSandboxConfigRequest] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = ServiceConnectedGithubVCSSandboxConfigRequest.from_dict( + _connected_github_vcs_config + ) + + drift_schedule = d.pop("drift_schedule", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, ServicePublicGitVCSSandboxConfigRequest] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = ServicePublicGitVCSSandboxConfigRequest.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + variables_files = cast(list[str], d.pop("variables_files", UNSET)) + + service_create_app_sandbox_config_request = cls( + env_vars=env_vars, + terraform_version=terraform_version, + variables=variables, + app_config_id=app_config_id, + connected_github_vcs_config=connected_github_vcs_config, + drift_schedule=drift_schedule, + public_git_vcs_config=public_git_vcs_config, + references=references, + variables_files=variables_files, + ) + + service_create_app_sandbox_config_request.additional_properties = d + return service_create_app_sandbox_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_sandbox_config_request_env_vars.py b/nuon/models/service_create_app_sandbox_config_request_env_vars.py new file mode 100644 index 00000000..7fc7b0a3 --- /dev/null +++ b/nuon/models/service_create_app_sandbox_config_request_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateAppSandboxConfigRequestEnvVars") + + +@_attrs_define +class ServiceCreateAppSandboxConfigRequestEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_app_sandbox_config_request_env_vars = cls() + + service_create_app_sandbox_config_request_env_vars.additional_properties = d + return service_create_app_sandbox_config_request_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_sandbox_config_request_variables.py b/nuon/models/service_create_app_sandbox_config_request_variables.py new file mode 100644 index 00000000..08150e96 --- /dev/null +++ b/nuon/models/service_create_app_sandbox_config_request_variables.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateAppSandboxConfigRequestVariables") + + +@_attrs_define +class ServiceCreateAppSandboxConfigRequestVariables: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_app_sandbox_config_request_variables = cls() + + service_create_app_sandbox_config_request_variables.additional_properties = d + return service_create_app_sandbox_config_request_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_secret_request.py b/nuon/models/service_create_app_secret_request.py new file mode 100644 index 00000000..cf276988 --- /dev/null +++ b/nuon/models/service_create_app_secret_request.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateAppSecretRequest") + + +@_attrs_define +class ServiceCreateAppSecretRequest: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + service_create_app_secret_request = cls( + name=name, + value=value, + ) + + service_create_app_secret_request.additional_properties = d + return service_create_app_secret_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_secrets_config_request.py b/nuon/models/service_create_app_secrets_config_request.py new file mode 100644 index 00000000..ea971d90 --- /dev/null +++ b/nuon/models/service_create_app_secrets_config_request.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_app_secret_config import ServiceAppSecretConfig + + +T = TypeVar("T", bound="ServiceCreateAppSecretsConfigRequest") + + +@_attrs_define +class ServiceCreateAppSecretsConfigRequest: + """ + Attributes: + app_config_id (str): + secrets (Union[Unset, list['ServiceAppSecretConfig']]): + """ + + app_config_id: str + secrets: Union[Unset, list["ServiceAppSecretConfig"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + secrets: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.secrets, Unset): + secrets = [] + for secrets_item_data in self.secrets: + secrets_item = secrets_item_data.to_dict() + secrets.append(secrets_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_config_id": app_config_id, + } + ) + if secrets is not UNSET: + field_dict["secrets"] = secrets + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_app_secret_config import ServiceAppSecretConfig + + d = dict(src_dict) + app_config_id = d.pop("app_config_id") + + secrets = [] + _secrets = d.pop("secrets", UNSET) + for secrets_item_data in _secrets or []: + secrets_item = ServiceAppSecretConfig.from_dict(secrets_item_data) + + secrets.append(secrets_item) + + service_create_app_secrets_config_request = cls( + app_config_id=app_config_id, + secrets=secrets, + ) + + service_create_app_secrets_config_request.additional_properties = d + return service_create_app_secrets_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_app_stack_config_request.py b/nuon/models/service_create_app_stack_config_request.py new file mode 100644 index 00000000..90b412d6 --- /dev/null +++ b/nuon/models/service_create_app_stack_config_request.py @@ -0,0 +1,104 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_stack_type import AppStackType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateAppStackConfigRequest") + + +@_attrs_define +class ServiceCreateAppStackConfigRequest: + """ + Attributes: + app_config_id (str): + description (str): + name (str): + type_ (AppStackType): + runner_nested_template_url (Union[Unset, str]): + vpc_nested_template_url (Union[Unset, str]): + """ + + app_config_id: str + description: str + name: str + type_: AppStackType + runner_nested_template_url: Union[Unset, str] = UNSET + vpc_nested_template_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + description = self.description + + name = self.name + + type_ = self.type_.value + + runner_nested_template_url = self.runner_nested_template_url + + vpc_nested_template_url = self.vpc_nested_template_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_config_id": app_config_id, + "description": description, + "name": name, + "type": type_, + } + ) + if runner_nested_template_url is not UNSET: + field_dict["runner_nested_template_url"] = runner_nested_template_url + if vpc_nested_template_url is not UNSET: + field_dict["vpc_nested_template_url"] = vpc_nested_template_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_config_id = d.pop("app_config_id") + + description = d.pop("description") + + name = d.pop("name") + + type_ = AppStackType(d.pop("type")) + + runner_nested_template_url = d.pop("runner_nested_template_url", UNSET) + + vpc_nested_template_url = d.pop("vpc_nested_template_url", UNSET) + + service_create_app_stack_config_request = cls( + app_config_id=app_config_id, + description=description, + name=name, + type_=type_, + runner_nested_template_url=runner_nested_template_url, + vpc_nested_template_url=vpc_nested_template_url, + ) + + service_create_app_stack_config_request.additional_properties = d + return service_create_app_stack_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_component_build_request.py b/nuon/models/service_create_component_build_request.py new file mode 100644 index 00000000..7bed66c8 --- /dev/null +++ b/nuon/models/service_create_component_build_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateComponentBuildRequest") + + +@_attrs_define +class ServiceCreateComponentBuildRequest: + """ + Attributes: + git_ref (Union[Unset, str]): + use_latest (Union[Unset, bool]): + """ + + git_ref: Union[Unset, str] = UNSET + use_latest: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + git_ref = self.git_ref + + use_latest = self.use_latest + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if git_ref is not UNSET: + field_dict["git_ref"] = git_ref + if use_latest is not UNSET: + field_dict["use_latest"] = use_latest + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + git_ref = d.pop("git_ref", UNSET) + + use_latest = d.pop("use_latest", UNSET) + + service_create_component_build_request = cls( + git_ref=git_ref, + use_latest=use_latest, + ) + + service_create_component_build_request.additional_properties = d + return service_create_component_build_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_component_release_request.py b/nuon/models/service_create_component_release_request.py new file mode 100644 index 00000000..7c2f8d7b --- /dev/null +++ b/nuon/models/service_create_component_release_request.py @@ -0,0 +1,103 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_component_release_request_strategy import ServiceCreateComponentReleaseRequestStrategy + + +T = TypeVar("T", bound="ServiceCreateComponentReleaseRequest") + + +@_attrs_define +class ServiceCreateComponentReleaseRequest: + """ + Attributes: + auto_build (Union[Unset, bool]): + build_id (Union[Unset, str]): + install_ids (Union[Unset, list[str]]): + strategy (Union[Unset, ServiceCreateComponentReleaseRequestStrategy]): + """ + + auto_build: Union[Unset, bool] = UNSET + build_id: Union[Unset, str] = UNSET + install_ids: Union[Unset, list[str]] = UNSET + strategy: Union[Unset, "ServiceCreateComponentReleaseRequestStrategy"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_build = self.auto_build + + build_id = self.build_id + + install_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.install_ids, Unset): + install_ids = self.install_ids + + strategy: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.strategy, Unset): + strategy = self.strategy.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auto_build is not UNSET: + field_dict["auto_build"] = auto_build + if build_id is not UNSET: + field_dict["build_id"] = build_id + if install_ids is not UNSET: + field_dict["install_ids"] = install_ids + if strategy is not UNSET: + field_dict["strategy"] = strategy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_component_release_request_strategy import ( + ServiceCreateComponentReleaseRequestStrategy, + ) + + d = dict(src_dict) + auto_build = d.pop("auto_build", UNSET) + + build_id = d.pop("build_id", UNSET) + + install_ids = cast(list[str], d.pop("install_ids", UNSET)) + + _strategy = d.pop("strategy", UNSET) + strategy: Union[Unset, ServiceCreateComponentReleaseRequestStrategy] + if isinstance(_strategy, Unset): + strategy = UNSET + else: + strategy = ServiceCreateComponentReleaseRequestStrategy.from_dict(_strategy) + + service_create_component_release_request = cls( + auto_build=auto_build, + build_id=build_id, + install_ids=install_ids, + strategy=strategy, + ) + + service_create_component_release_request.additional_properties = d + return service_create_component_release_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_component_release_request_strategy.py b/nuon/models/service_create_component_release_request_strategy.py new file mode 100644 index 00000000..78688e15 --- /dev/null +++ b/nuon/models/service_create_component_release_request_strategy.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateComponentReleaseRequestStrategy") + + +@_attrs_define +class ServiceCreateComponentReleaseRequestStrategy: + """ + Attributes: + delay (Union[Unset, str]): + installs_per_step (Union[Unset, int]): + """ + + delay: Union[Unset, str] = UNSET + installs_per_step: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + delay = self.delay + + installs_per_step = self.installs_per_step + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if delay is not UNSET: + field_dict["delay"] = delay + if installs_per_step is not UNSET: + field_dict["installs_per_step"] = installs_per_step + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + delay = d.pop("delay", UNSET) + + installs_per_step = d.pop("installs_per_step", UNSET) + + service_create_component_release_request_strategy = cls( + delay=delay, + installs_per_step=installs_per_step, + ) + + service_create_component_release_request_strategy.additional_properties = d + return service_create_component_release_request_strategy + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_component_request.py b/nuon/models/service_create_component_request.py new file mode 100644 index 00000000..28bc9c45 --- /dev/null +++ b/nuon/models/service_create_component_request.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateComponentRequest") + + +@_attrs_define +class ServiceCreateComponentRequest: + """ + Attributes: + name (str): + dependencies (Union[Unset, list[str]]): + var_name (Union[Unset, str]): + """ + + name: str + dependencies: Union[Unset, list[str]] = UNSET + var_name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + var_name = self.var_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if var_name is not UNSET: + field_dict["var_name"] = var_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + var_name = d.pop("var_name", UNSET) + + service_create_component_request = cls( + name=name, + dependencies=dependencies, + var_name=var_name, + ) + + service_create_component_request.additional_properties = d + return service_create_component_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_connection_callback_request.py b/nuon/models/service_create_connection_callback_request.py new file mode 100644 index 00000000..5ac6739c --- /dev/null +++ b/nuon/models/service_create_connection_callback_request.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateConnectionCallbackRequest") + + +@_attrs_define +class ServiceCreateConnectionCallbackRequest: + """ + Attributes: + github_install_id (str): + org_id (str): + """ + + github_install_id: str + org_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + github_install_id = self.github_install_id + + org_id = self.org_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "github_install_id": github_install_id, + "org_id": org_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + github_install_id = d.pop("github_install_id") + + org_id = d.pop("org_id") + + service_create_connection_callback_request = cls( + github_install_id=github_install_id, + org_id=org_id, + ) + + service_create_connection_callback_request.additional_properties = d + return service_create_connection_callback_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_connection_request.py b/nuon/models/service_create_connection_request.py new file mode 100644 index 00000000..e48abf36 --- /dev/null +++ b/nuon/models/service_create_connection_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateConnectionRequest") + + +@_attrs_define +class ServiceCreateConnectionRequest: + """ + Attributes: + github_install_id (str): + """ + + github_install_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + github_install_id = self.github_install_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "github_install_id": github_install_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + github_install_id = d.pop("github_install_id") + + service_create_connection_request = cls( + github_install_id=github_install_id, + ) + + service_create_connection_request.additional_properties = d + return service_create_connection_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_docker_build_component_config_request.py b/nuon/models/service_create_docker_build_component_config_request.py new file mode 100644 index 00000000..035ea301 --- /dev/null +++ b/nuon/models/service_create_docker_build_component_config_request.py @@ -0,0 +1,183 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest + from ..models.service_create_docker_build_component_config_request_env_vars import ( + ServiceCreateDockerBuildComponentConfigRequestEnvVars, + ) + from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest + + +T = TypeVar("T", bound="ServiceCreateDockerBuildComponentConfigRequest") + + +@_attrs_define +class ServiceCreateDockerBuildComponentConfigRequest: + """ + Attributes: + dockerfile (str): + app_config_id (Union[Unset, str]): + build_args (Union[Unset, list[str]]): + checksum (Union[Unset, str]): + connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): + dependencies (Union[Unset, list[str]]): + env_vars (Union[Unset, ServiceCreateDockerBuildComponentConfigRequestEnvVars]): + public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): + references (Union[Unset, list[str]]): + target (Union[Unset, str]): + """ + + dockerfile: str + app_config_id: Union[Unset, str] = UNSET + build_args: Union[Unset, list[str]] = UNSET + checksum: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + env_vars: Union[Unset, "ServiceCreateDockerBuildComponentConfigRequestEnvVars"] = UNSET + public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET + references: Union[Unset, list[str]] = UNSET + target: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dockerfile = self.dockerfile + + app_config_id = self.app_config_id + + build_args: Union[Unset, list[str]] = UNSET + if not isinstance(self.build_args, Unset): + build_args = self.build_args + + checksum = self.checksum + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + target = self.target + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dockerfile": dockerfile, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if build_args is not UNSET: + field_dict["build_args"] = build_args + if checksum is not UNSET: + field_dict["checksum"] = checksum + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if target is not UNSET: + field_dict["target"] = target + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest + from ..models.service_create_docker_build_component_config_request_env_vars import ( + ServiceCreateDockerBuildComponentConfigRequestEnvVars, + ) + from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest + + d = dict(src_dict) + dockerfile = d.pop("dockerfile") + + app_config_id = d.pop("app_config_id", UNSET) + + build_args = cast(list[str], d.pop("build_args", UNSET)) + + checksum = d.pop("checksum", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = ServiceConnectedGithubVCSConfigRequest.from_dict(_connected_github_vcs_config) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, ServiceCreateDockerBuildComponentConfigRequestEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = ServiceCreateDockerBuildComponentConfigRequestEnvVars.from_dict(_env_vars) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = ServicePublicGitVCSConfigRequest.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + target = d.pop("target", UNSET) + + service_create_docker_build_component_config_request = cls( + dockerfile=dockerfile, + app_config_id=app_config_id, + build_args=build_args, + checksum=checksum, + connected_github_vcs_config=connected_github_vcs_config, + dependencies=dependencies, + env_vars=env_vars, + public_git_vcs_config=public_git_vcs_config, + references=references, + target=target, + ) + + service_create_docker_build_component_config_request.additional_properties = d + return service_create_docker_build_component_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_docker_build_component_config_request_env_vars.py b/nuon/models/service_create_docker_build_component_config_request_env_vars.py new file mode 100644 index 00000000..2f118ba1 --- /dev/null +++ b/nuon/models/service_create_docker_build_component_config_request_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateDockerBuildComponentConfigRequestEnvVars") + + +@_attrs_define +class ServiceCreateDockerBuildComponentConfigRequestEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_docker_build_component_config_request_env_vars = cls() + + service_create_docker_build_component_config_request_env_vars.additional_properties = d + return service_create_docker_build_component_config_request_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_external_image_component_config_request.py b/nuon/models/service_create_external_image_component_config_request.py new file mode 100644 index 00000000..f366cc13 --- /dev/null +++ b/nuon/models/service_create_external_image_component_config_request.py @@ -0,0 +1,131 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest + + +T = TypeVar("T", bound="ServiceCreateExternalImageComponentConfigRequest") + + +@_attrs_define +class ServiceCreateExternalImageComponentConfigRequest: + """ + Attributes: + image_url (str): + tag (str): + app_config_id (Union[Unset, str]): + aws_ecr_image_config (Union[Unset, ServiceAwsECRImageConfigRequest]): + checksum (Union[Unset, str]): + dependencies (Union[Unset, list[str]]): + references (Union[Unset, list[str]]): + """ + + image_url: str + tag: str + app_config_id: Union[Unset, str] = UNSET + aws_ecr_image_config: Union[Unset, "ServiceAwsECRImageConfigRequest"] = UNSET + checksum: Union[Unset, str] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + references: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + image_url = self.image_url + + tag = self.tag + + app_config_id = self.app_config_id + + aws_ecr_image_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_ecr_image_config, Unset): + aws_ecr_image_config = self.aws_ecr_image_config.to_dict() + + checksum = self.checksum + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "image_url": image_url, + "tag": tag, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if aws_ecr_image_config is not UNSET: + field_dict["aws_ecr_image_config"] = aws_ecr_image_config + if checksum is not UNSET: + field_dict["checksum"] = checksum + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if references is not UNSET: + field_dict["references"] = references + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest + + d = dict(src_dict) + image_url = d.pop("image_url") + + tag = d.pop("tag") + + app_config_id = d.pop("app_config_id", UNSET) + + _aws_ecr_image_config = d.pop("aws_ecr_image_config", UNSET) + aws_ecr_image_config: Union[Unset, ServiceAwsECRImageConfigRequest] + if isinstance(_aws_ecr_image_config, Unset): + aws_ecr_image_config = UNSET + else: + aws_ecr_image_config = ServiceAwsECRImageConfigRequest.from_dict(_aws_ecr_image_config) + + checksum = d.pop("checksum", UNSET) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + references = cast(list[str], d.pop("references", UNSET)) + + service_create_external_image_component_config_request = cls( + image_url=image_url, + tag=tag, + app_config_id=app_config_id, + aws_ecr_image_config=aws_ecr_image_config, + checksum=checksum, + dependencies=dependencies, + references=references, + ) + + service_create_external_image_component_config_request.additional_properties = d + return service_create_external_image_component_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_helm_component_config_request.py b/nuon/models/service_create_helm_component_config_request.py new file mode 100644 index 00000000..e5f2e720 --- /dev/null +++ b/nuon/models/service_create_helm_component_config_request.py @@ -0,0 +1,202 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest + from ..models.service_create_helm_component_config_request_values import ( + ServiceCreateHelmComponentConfigRequestValues, + ) + from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest + + +T = TypeVar("T", bound="ServiceCreateHelmComponentConfigRequest") + + +@_attrs_define +class ServiceCreateHelmComponentConfigRequest: + """ + Attributes: + chart_name (str): + values (ServiceCreateHelmComponentConfigRequestValues): + app_config_id (Union[Unset, str]): + checksum (Union[Unset, str]): + connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): + dependencies (Union[Unset, list[str]]): + drift_schedule (Union[Unset, str]): + namespace (Union[Unset, str]): + public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): + references (Union[Unset, list[str]]): + storage_driver (Union[Unset, str]): + take_ownership (Union[Unset, bool]): + values_files (Union[Unset, list[str]]): + """ + + chart_name: str + values: "ServiceCreateHelmComponentConfigRequestValues" + app_config_id: Union[Unset, str] = UNSET + checksum: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + drift_schedule: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET + references: Union[Unset, list[str]] = UNSET + storage_driver: Union[Unset, str] = UNSET + take_ownership: Union[Unset, bool] = UNSET + values_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + chart_name = self.chart_name + + values = self.values.to_dict() + + app_config_id = self.app_config_id + + checksum = self.checksum + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + drift_schedule = self.drift_schedule + + namespace = self.namespace + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + storage_driver = self.storage_driver + + take_ownership = self.take_ownership + + values_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.values_files, Unset): + values_files = self.values_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "chart_name": chart_name, + "values": values, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if checksum is not UNSET: + field_dict["checksum"] = checksum + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule + if namespace is not UNSET: + field_dict["namespace"] = namespace + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if storage_driver is not UNSET: + field_dict["storage_driver"] = storage_driver + if take_ownership is not UNSET: + field_dict["take_ownership"] = take_ownership + if values_files is not UNSET: + field_dict["values_files"] = values_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest + from ..models.service_create_helm_component_config_request_values import ( + ServiceCreateHelmComponentConfigRequestValues, + ) + from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest + + d = dict(src_dict) + chart_name = d.pop("chart_name") + + values = ServiceCreateHelmComponentConfigRequestValues.from_dict(d.pop("values")) + + app_config_id = d.pop("app_config_id", UNSET) + + checksum = d.pop("checksum", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = ServiceConnectedGithubVCSConfigRequest.from_dict(_connected_github_vcs_config) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + drift_schedule = d.pop("drift_schedule", UNSET) + + namespace = d.pop("namespace", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = ServicePublicGitVCSConfigRequest.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + storage_driver = d.pop("storage_driver", UNSET) + + take_ownership = d.pop("take_ownership", UNSET) + + values_files = cast(list[str], d.pop("values_files", UNSET)) + + service_create_helm_component_config_request = cls( + chart_name=chart_name, + values=values, + app_config_id=app_config_id, + checksum=checksum, + connected_github_vcs_config=connected_github_vcs_config, + dependencies=dependencies, + drift_schedule=drift_schedule, + namespace=namespace, + public_git_vcs_config=public_git_vcs_config, + references=references, + storage_driver=storage_driver, + take_ownership=take_ownership, + values_files=values_files, + ) + + service_create_helm_component_config_request.additional_properties = d + return service_create_helm_component_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_helm_component_config_request_values.py b/nuon/models/service_create_helm_component_config_request_values.py new file mode 100644 index 00000000..a98ebfee --- /dev/null +++ b/nuon/models/service_create_helm_component_config_request_values.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateHelmComponentConfigRequestValues") + + +@_attrs_define +class ServiceCreateHelmComponentConfigRequestValues: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_helm_component_config_request_values = cls() + + service_create_helm_component_config_request_values.additional_properties = d + return service_create_helm_component_config_request_values + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_action_workflow_run_request.py b/nuon/models/service_create_install_action_workflow_run_request.py new file mode 100644 index 00000000..38e0b8fc --- /dev/null +++ b/nuon/models/service_create_install_action_workflow_run_request.py @@ -0,0 +1,85 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_install_action_workflow_run_request_run_env_vars import ( + ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, + ) + + +T = TypeVar("T", bound="ServiceCreateInstallActionWorkflowRunRequest") + + +@_attrs_define +class ServiceCreateInstallActionWorkflowRunRequest: + """ + Attributes: + action_workflow_config_id (Union[Unset, str]): + run_env_vars (Union[Unset, ServiceCreateInstallActionWorkflowRunRequestRunEnvVars]): + """ + + action_workflow_config_id: Union[Unset, str] = UNSET + run_env_vars: Union[Unset, "ServiceCreateInstallActionWorkflowRunRequestRunEnvVars"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_config_id = self.action_workflow_config_id + + run_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.run_env_vars, Unset): + run_env_vars = self.run_env_vars.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_config_id is not UNSET: + field_dict["action_workflow_config_id"] = action_workflow_config_id + if run_env_vars is not UNSET: + field_dict["run_env_vars"] = run_env_vars + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_install_action_workflow_run_request_run_env_vars import ( + ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, + ) + + d = dict(src_dict) + action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) + + _run_env_vars = d.pop("run_env_vars", UNSET) + run_env_vars: Union[Unset, ServiceCreateInstallActionWorkflowRunRequestRunEnvVars] + if isinstance(_run_env_vars, Unset): + run_env_vars = UNSET + else: + run_env_vars = ServiceCreateInstallActionWorkflowRunRequestRunEnvVars.from_dict(_run_env_vars) + + service_create_install_action_workflow_run_request = cls( + action_workflow_config_id=action_workflow_config_id, + run_env_vars=run_env_vars, + ) + + service_create_install_action_workflow_run_request.additional_properties = d + return service_create_install_action_workflow_run_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py b/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py new file mode 100644 index 00000000..10aff0bc --- /dev/null +++ b/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateInstallActionWorkflowRunRequestRunEnvVars") + + +@_attrs_define +class ServiceCreateInstallActionWorkflowRunRequestRunEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_install_action_workflow_run_request_run_env_vars = cls() + + service_create_install_action_workflow_run_request_run_env_vars.additional_properties = d + return service_create_install_action_workflow_run_request_run_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_component_deploy_request.py b/nuon/models/service_create_install_component_deploy_request.py new file mode 100644 index 00000000..f82c83da --- /dev/null +++ b/nuon/models/service_create_install_component_deploy_request.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallComponentDeployRequest") + + +@_attrs_define +class ServiceCreateInstallComponentDeployRequest: + """ + Attributes: + build_id (Union[Unset, str]): + deploy_dependents (Union[Unset, bool]): + plan_only (Union[Unset, bool]): + """ + + build_id: Union[Unset, str] = UNSET + deploy_dependents: Union[Unset, bool] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_id = self.build_id + + deploy_dependents = self.deploy_dependents + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_id is not UNSET: + field_dict["build_id"] = build_id + if deploy_dependents is not UNSET: + field_dict["deploy_dependents"] = deploy_dependents + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + build_id = d.pop("build_id", UNSET) + + deploy_dependents = d.pop("deploy_dependents", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_create_install_component_deploy_request = cls( + build_id=build_id, + deploy_dependents=deploy_dependents, + plan_only=plan_only, + ) + + service_create_install_component_deploy_request.additional_properties = d + return service_create_install_component_deploy_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_config_request.py b/nuon/models/service_create_install_config_request.py new file mode 100644 index 00000000..998dbd0f --- /dev/null +++ b/nuon/models/service_create_install_config_request.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallConfigRequest") + + +@_attrs_define +class ServiceCreateInstallConfigRequest: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + service_create_install_config_request = cls( + approval_option=approval_option, + ) + + service_create_install_config_request.additional_properties = d + return service_create_install_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_deploy_request.py b/nuon/models/service_create_install_deploy_request.py new file mode 100644 index 00000000..490946ff --- /dev/null +++ b/nuon/models/service_create_install_deploy_request.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallDeployRequest") + + +@_attrs_define +class ServiceCreateInstallDeployRequest: + """ + Attributes: + build_id (Union[Unset, str]): + deploy_dependents (Union[Unset, bool]): + plan_only (Union[Unset, bool]): + """ + + build_id: Union[Unset, str] = UNSET + deploy_dependents: Union[Unset, bool] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_id = self.build_id + + deploy_dependents = self.deploy_dependents + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_id is not UNSET: + field_dict["build_id"] = build_id + if deploy_dependents is not UNSET: + field_dict["deploy_dependents"] = deploy_dependents + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + build_id = d.pop("build_id", UNSET) + + deploy_dependents = d.pop("deploy_dependents", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_create_install_deploy_request = cls( + build_id=build_id, + deploy_dependents=deploy_dependents, + plan_only=plan_only, + ) + + service_create_install_deploy_request.additional_properties = d + return service_create_install_deploy_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_inputs_request.py b/nuon/models/service_create_install_inputs_request.py new file mode 100644 index 00000000..f09fae99 --- /dev/null +++ b/nuon/models/service_create_install_inputs_request.py @@ -0,0 +1,65 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_create_install_inputs_request_inputs import ServiceCreateInstallInputsRequestInputs + + +T = TypeVar("T", bound="ServiceCreateInstallInputsRequest") + + +@_attrs_define +class ServiceCreateInstallInputsRequest: + """ + Attributes: + inputs (ServiceCreateInstallInputsRequestInputs): + """ + + inputs: "ServiceCreateInstallInputsRequestInputs" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + inputs = self.inputs.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "inputs": inputs, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_install_inputs_request_inputs import ServiceCreateInstallInputsRequestInputs + + d = dict(src_dict) + inputs = ServiceCreateInstallInputsRequestInputs.from_dict(d.pop("inputs")) + + service_create_install_inputs_request = cls( + inputs=inputs, + ) + + service_create_install_inputs_request.additional_properties = d + return service_create_install_inputs_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_inputs_request_inputs.py b/nuon/models/service_create_install_inputs_request_inputs.py new file mode 100644 index 00000000..a94c7938 --- /dev/null +++ b/nuon/models/service_create_install_inputs_request_inputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateInstallInputsRequestInputs") + + +@_attrs_define +class ServiceCreateInstallInputsRequestInputs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_install_inputs_request_inputs = cls() + + service_create_install_inputs_request_inputs.additional_properties = d + return service_create_install_inputs_request_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_request.py b/nuon/models/service_create_install_request.py new file mode 100644 index 00000000..d6c6cabf --- /dev/null +++ b/nuon/models/service_create_install_request.py @@ -0,0 +1,155 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount + from ..models.service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount + from ..models.service_create_install_request_inputs import ServiceCreateInstallRequestInputs + + +T = TypeVar("T", bound="ServiceCreateInstallRequest") + + +@_attrs_define +class ServiceCreateInstallRequest: + """ + Attributes: + name (str): + aws_account (Union[Unset, ServiceCreateInstallRequestAwsAccount]): + azure_account (Union[Unset, ServiceCreateInstallRequestAzureAccount]): + inputs (Union[Unset, ServiceCreateInstallRequestInputs]): + install_config (Union[Unset, HelpersCreateInstallConfigParams]): + metadata (Union[Unset, HelpersInstallMetadata]): + """ + + name: str + aws_account: Union[Unset, "ServiceCreateInstallRequestAwsAccount"] = UNSET + azure_account: Union[Unset, "ServiceCreateInstallRequestAzureAccount"] = UNSET + inputs: Union[Unset, "ServiceCreateInstallRequestInputs"] = UNSET + install_config: Union[Unset, "HelpersCreateInstallConfigParams"] = UNSET + metadata: Union[Unset, "HelpersInstallMetadata"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + aws_account: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_account, Unset): + aws_account = self.aws_account.to_dict() + + azure_account: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_account, Unset): + azure_account = self.azure_account.to_dict() + + inputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.inputs, Unset): + inputs = self.inputs.to_dict() + + install_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_config, Unset): + install_config = self.install_config.to_dict() + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if aws_account is not UNSET: + field_dict["aws_account"] = aws_account + if azure_account is not UNSET: + field_dict["azure_account"] = azure_account + if inputs is not UNSET: + field_dict["inputs"] = inputs + if install_config is not UNSET: + field_dict["install_config"] = install_config + if metadata is not UNSET: + field_dict["metadata"] = metadata + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount + from ..models.service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount + from ..models.service_create_install_request_inputs import ServiceCreateInstallRequestInputs + + d = dict(src_dict) + name = d.pop("name") + + _aws_account = d.pop("aws_account", UNSET) + aws_account: Union[Unset, ServiceCreateInstallRequestAwsAccount] + if isinstance(_aws_account, Unset): + aws_account = UNSET + else: + aws_account = ServiceCreateInstallRequestAwsAccount.from_dict(_aws_account) + + _azure_account = d.pop("azure_account", UNSET) + azure_account: Union[Unset, ServiceCreateInstallRequestAzureAccount] + if isinstance(_azure_account, Unset): + azure_account = UNSET + else: + azure_account = ServiceCreateInstallRequestAzureAccount.from_dict(_azure_account) + + _inputs = d.pop("inputs", UNSET) + inputs: Union[Unset, ServiceCreateInstallRequestInputs] + if isinstance(_inputs, Unset): + inputs = UNSET + else: + inputs = ServiceCreateInstallRequestInputs.from_dict(_inputs) + + _install_config = d.pop("install_config", UNSET) + install_config: Union[Unset, HelpersCreateInstallConfigParams] + if isinstance(_install_config, Unset): + install_config = UNSET + else: + install_config = HelpersCreateInstallConfigParams.from_dict(_install_config) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, HelpersInstallMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = HelpersInstallMetadata.from_dict(_metadata) + + service_create_install_request = cls( + name=name, + aws_account=aws_account, + azure_account=azure_account, + inputs=inputs, + install_config=install_config, + metadata=metadata, + ) + + service_create_install_request.additional_properties = d + return service_create_install_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_request_aws_account.py b/nuon/models/service_create_install_request_aws_account.py new file mode 100644 index 00000000..2449009e --- /dev/null +++ b/nuon/models/service_create_install_request_aws_account.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallRequestAwsAccount") + + +@_attrs_define +class ServiceCreateInstallRequestAwsAccount: + """ + Attributes: + region (Union[Unset, str]): + """ + + region: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + region = self.region + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if region is not UNSET: + field_dict["region"] = region + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + region = d.pop("region", UNSET) + + service_create_install_request_aws_account = cls( + region=region, + ) + + service_create_install_request_aws_account.additional_properties = d + return service_create_install_request_aws_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_request_azure_account.py b/nuon/models/service_create_install_request_azure_account.py new file mode 100644 index 00000000..3fd7df2e --- /dev/null +++ b/nuon/models/service_create_install_request_azure_account.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallRequestAzureAccount") + + +@_attrs_define +class ServiceCreateInstallRequestAzureAccount: + """ + Attributes: + location (Union[Unset, str]): + """ + + location: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + location = self.location + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if location is not UNSET: + field_dict["location"] = location + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + location = d.pop("location", UNSET) + + service_create_install_request_azure_account = cls( + location=location, + ) + + service_create_install_request_azure_account.additional_properties = d + return service_create_install_request_azure_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_install_request_inputs.py b/nuon/models/service_create_install_request_inputs.py new file mode 100644 index 00000000..c7b521e7 --- /dev/null +++ b/nuon/models/service_create_install_request_inputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateInstallRequestInputs") + + +@_attrs_define +class ServiceCreateInstallRequestInputs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_install_request_inputs = cls() + + service_create_install_request_inputs.additional_properties = d + return service_create_install_request_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_installer_request.py b/nuon/models/service_create_installer_request.py new file mode 100644 index 00000000..dcf6c0e1 --- /dev/null +++ b/nuon/models/service_create_installer_request.py @@ -0,0 +1,91 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata + + +T = TypeVar("T", bound="ServiceCreateInstallerRequest") + + +@_attrs_define +class ServiceCreateInstallerRequest: + """ + Attributes: + app_ids (list[str]): + name (str): + metadata (Union[Unset, ServiceCreateInstallerRequestMetadata]): + """ + + app_ids: list[str] + name: str + metadata: Union[Unset, "ServiceCreateInstallerRequestMetadata"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_ids = self.app_ids + + name = self.name + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_ids": app_ids, + "name": name, + } + ) + if metadata is not UNSET: + field_dict["metadata"] = metadata + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata + + d = dict(src_dict) + app_ids = cast(list[str], d.pop("app_ids")) + + name = d.pop("name") + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, ServiceCreateInstallerRequestMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = ServiceCreateInstallerRequestMetadata.from_dict(_metadata) + + service_create_installer_request = cls( + app_ids=app_ids, + name=name, + metadata=metadata, + ) + + service_create_installer_request.additional_properties = d + return service_create_installer_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_installer_request_metadata.py b/nuon/models/service_create_installer_request_metadata.py new file mode 100644 index 00000000..97c26002 --- /dev/null +++ b/nuon/models/service_create_installer_request_metadata.py @@ -0,0 +1,154 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallerRequestMetadata") + + +@_attrs_define +class ServiceCreateInstallerRequestMetadata: + """ + Attributes: + community_url (str): + description (str): + documentation_url (str): + favicon_url (str): + github_url (str): + homepage_url (str): + logo_url (str): + copyright_markdown (Union[Unset, str]): + demo_url (Union[Unset, str]): + footer_markdown (Union[Unset, str]): + og_image_url (Union[Unset, str]): + post_install_markdown (Union[Unset, str]): + """ + + community_url: str + description: str + documentation_url: str + favicon_url: str + github_url: str + homepage_url: str + logo_url: str + copyright_markdown: Union[Unset, str] = UNSET + demo_url: Union[Unset, str] = UNSET + footer_markdown: Union[Unset, str] = UNSET + og_image_url: Union[Unset, str] = UNSET + post_install_markdown: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + community_url = self.community_url + + description = self.description + + documentation_url = self.documentation_url + + favicon_url = self.favicon_url + + github_url = self.github_url + + homepage_url = self.homepage_url + + logo_url = self.logo_url + + copyright_markdown = self.copyright_markdown + + demo_url = self.demo_url + + footer_markdown = self.footer_markdown + + og_image_url = self.og_image_url + + post_install_markdown = self.post_install_markdown + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "community_url": community_url, + "description": description, + "documentation_url": documentation_url, + "favicon_url": favicon_url, + "github_url": github_url, + "homepage_url": homepage_url, + "logo_url": logo_url, + } + ) + if copyright_markdown is not UNSET: + field_dict["copyright_markdown"] = copyright_markdown + if demo_url is not UNSET: + field_dict["demo_url"] = demo_url + if footer_markdown is not UNSET: + field_dict["footer_markdown"] = footer_markdown + if og_image_url is not UNSET: + field_dict["og_image_url"] = og_image_url + if post_install_markdown is not UNSET: + field_dict["post_install_markdown"] = post_install_markdown + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + community_url = d.pop("community_url") + + description = d.pop("description") + + documentation_url = d.pop("documentation_url") + + favicon_url = d.pop("favicon_url") + + github_url = d.pop("github_url") + + homepage_url = d.pop("homepage_url") + + logo_url = d.pop("logo_url") + + copyright_markdown = d.pop("copyright_markdown", UNSET) + + demo_url = d.pop("demo_url", UNSET) + + footer_markdown = d.pop("footer_markdown", UNSET) + + og_image_url = d.pop("og_image_url", UNSET) + + post_install_markdown = d.pop("post_install_markdown", UNSET) + + service_create_installer_request_metadata = cls( + community_url=community_url, + description=description, + documentation_url=documentation_url, + favicon_url=favicon_url, + github_url=github_url, + homepage_url=homepage_url, + logo_url=logo_url, + copyright_markdown=copyright_markdown, + demo_url=demo_url, + footer_markdown=footer_markdown, + og_image_url=og_image_url, + post_install_markdown=post_install_markdown, + ) + + service_create_installer_request_metadata.additional_properties = d + return service_create_installer_request_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/nuon/models/service_create_job_component_config_request.py b/nuon/models/service_create_job_component_config_request.py new file mode 100644 index 00000000..dff977a7 --- /dev/null +++ b/nuon/models/service_create_job_component_config_request.py @@ -0,0 +1,146 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_create_job_component_config_request_env_vars import ( + ServiceCreateJobComponentConfigRequestEnvVars, + ) + + +T = TypeVar("T", bound="ServiceCreateJobComponentConfigRequest") + + +@_attrs_define +class ServiceCreateJobComponentConfigRequest: + """ + Attributes: + image_url (str): + tag (str): + app_config_id (Union[Unset, str]): + args (Union[Unset, list[str]]): + checksum (Union[Unset, str]): + cmd (Union[Unset, list[str]]): + env_vars (Union[Unset, ServiceCreateJobComponentConfigRequestEnvVars]): + references (Union[Unset, list[str]]): + """ + + image_url: str + tag: str + app_config_id: Union[Unset, str] = UNSET + args: Union[Unset, list[str]] = UNSET + checksum: Union[Unset, str] = UNSET + cmd: Union[Unset, list[str]] = UNSET + env_vars: Union[Unset, "ServiceCreateJobComponentConfigRequestEnvVars"] = UNSET + references: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + image_url = self.image_url + + tag = self.tag + + app_config_id = self.app_config_id + + args: Union[Unset, list[str]] = UNSET + if not isinstance(self.args, Unset): + args = self.args + + checksum = self.checksum + + cmd: Union[Unset, list[str]] = UNSET + if not isinstance(self.cmd, Unset): + cmd = self.cmd + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "image_url": image_url, + "tag": tag, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if args is not UNSET: + field_dict["args"] = args + if checksum is not UNSET: + field_dict["checksum"] = checksum + if cmd is not UNSET: + field_dict["cmd"] = cmd + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if references is not UNSET: + field_dict["references"] = references + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_job_component_config_request_env_vars import ( + ServiceCreateJobComponentConfigRequestEnvVars, + ) + + d = dict(src_dict) + image_url = d.pop("image_url") + + tag = d.pop("tag") + + app_config_id = d.pop("app_config_id", UNSET) + + args = cast(list[str], d.pop("args", UNSET)) + + checksum = d.pop("checksum", UNSET) + + cmd = cast(list[str], d.pop("cmd", UNSET)) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, ServiceCreateJobComponentConfigRequestEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = ServiceCreateJobComponentConfigRequestEnvVars.from_dict(_env_vars) + + references = cast(list[str], d.pop("references", UNSET)) + + service_create_job_component_config_request = cls( + image_url=image_url, + tag=tag, + app_config_id=app_config_id, + args=args, + checksum=checksum, + cmd=cmd, + env_vars=env_vars, + references=references, + ) + + service_create_job_component_config_request.additional_properties = d + return service_create_job_component_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_job_component_config_request_env_vars.py b/nuon/models/service_create_job_component_config_request_env_vars.py new file mode 100644 index 00000000..dd284a70 --- /dev/null +++ b/nuon/models/service_create_job_component_config_request_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateJobComponentConfigRequestEnvVars") + + +@_attrs_define +class ServiceCreateJobComponentConfigRequestEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_job_component_config_request_env_vars = cls() + + service_create_job_component_config_request_env_vars.additional_properties = d + return service_create_job_component_config_request_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_kubernetes_manifest_component_config_request.py b/nuon/models/service_create_kubernetes_manifest_component_config_request.py new file mode 100644 index 00000000..4c7e2f45 --- /dev/null +++ b/nuon/models/service_create_kubernetes_manifest_component_config_request.py @@ -0,0 +1,117 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateKubernetesManifestComponentConfigRequest") + + +@_attrs_define +class ServiceCreateKubernetesManifestComponentConfigRequest: + """ + Attributes: + app_config_id (Union[Unset, str]): + checksum (Union[Unset, str]): + dependencies (Union[Unset, list[str]]): + drift_schedule (Union[Unset, str]): + manifest (Union[Unset, str]): + namespace (Union[Unset, str]): + references (Union[Unset, list[str]]): + """ + + app_config_id: Union[Unset, str] = UNSET + checksum: Union[Unset, str] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + drift_schedule: Union[Unset, str] = UNSET + manifest: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + references: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + checksum = self.checksum + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + drift_schedule = self.drift_schedule + + manifest = self.manifest + + namespace = self.namespace + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if checksum is not UNSET: + field_dict["checksum"] = checksum + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule + if manifest is not UNSET: + field_dict["manifest"] = manifest + if namespace is not UNSET: + field_dict["namespace"] = namespace + if references is not UNSET: + field_dict["references"] = references + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + checksum = d.pop("checksum", UNSET) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + drift_schedule = d.pop("drift_schedule", UNSET) + + manifest = d.pop("manifest", UNSET) + + namespace = d.pop("namespace", UNSET) + + references = cast(list[str], d.pop("references", UNSET)) + + service_create_kubernetes_manifest_component_config_request = cls( + app_config_id=app_config_id, + checksum=checksum, + dependencies=dependencies, + drift_schedule=drift_schedule, + manifest=manifest, + namespace=namespace, + references=references, + ) + + service_create_kubernetes_manifest_component_config_request.additional_properties = d + return service_create_kubernetes_manifest_component_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_org_invite_request.py b/nuon/models/service_create_org_invite_request.py new file mode 100644 index 00000000..74696684 --- /dev/null +++ b/nuon/models/service_create_org_invite_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateOrgInviteRequest") + + +@_attrs_define +class ServiceCreateOrgInviteRequest: + """ + Attributes: + email (str): + """ + + email: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + email = self.email + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + email = d.pop("email") + + service_create_org_invite_request = cls( + email=email, + ) + + service_create_org_invite_request.additional_properties = d + return service_create_org_invite_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_org_request.py b/nuon/models/service_create_org_request.py new file mode 100644 index 00000000..62816b52 --- /dev/null +++ b/nuon/models/service_create_org_request.py @@ -0,0 +1,70 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateOrgRequest") + + +@_attrs_define +class ServiceCreateOrgRequest: + """ + Attributes: + name (str): + use_sandbox_mode (Union[Unset, bool]): These fields are used to control the behaviour of the org. + """ + + name: str + use_sandbox_mode: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + use_sandbox_mode = self.use_sandbox_mode + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if use_sandbox_mode is not UNSET: + field_dict["use_sandbox_mode"] = use_sandbox_mode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + use_sandbox_mode = d.pop("use_sandbox_mode", UNSET) + + service_create_org_request = cls( + name=name, + use_sandbox_mode=use_sandbox_mode, + ) + + service_create_org_request.additional_properties = d + return service_create_org_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_org_user_request.py b/nuon/models/service_create_org_user_request.py new file mode 100644 index 00000000..74b3bf80 --- /dev/null +++ b/nuon/models/service_create_org_user_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateOrgUserRequest") + + +@_attrs_define +class ServiceCreateOrgUserRequest: + """ + Attributes: + user_id (Union[Unset, str]): + """ + + user_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = self.user_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = d.pop("user_id", UNSET) + + service_create_org_user_request = cls( + user_id=user_id, + ) + + service_create_org_user_request.additional_properties = d + return service_create_org_user_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_module_component_config_request.py b/nuon/models/service_create_terraform_module_component_config_request.py new file mode 100644 index 00000000..7a6182a7 --- /dev/null +++ b/nuon/models/service_create_terraform_module_component_config_request.py @@ -0,0 +1,190 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest + from ..models.service_create_terraform_module_component_config_request_env_vars import ( + ServiceCreateTerraformModuleComponentConfigRequestEnvVars, + ) + from ..models.service_create_terraform_module_component_config_request_variables import ( + ServiceCreateTerraformModuleComponentConfigRequestVariables, + ) + from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest + + +T = TypeVar("T", bound="ServiceCreateTerraformModuleComponentConfigRequest") + + +@_attrs_define +class ServiceCreateTerraformModuleComponentConfigRequest: + """ + Attributes: + env_vars (ServiceCreateTerraformModuleComponentConfigRequestEnvVars): + variables (ServiceCreateTerraformModuleComponentConfigRequestVariables): + app_config_id (Union[Unset, str]): + checksum (Union[Unset, str]): + connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): + dependencies (Union[Unset, list[str]]): + drift_schedule (Union[Unset, str]): + public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): + references (Union[Unset, list[str]]): + variables_files (Union[Unset, list[str]]): + version (Union[Unset, str]): + """ + + env_vars: "ServiceCreateTerraformModuleComponentConfigRequestEnvVars" + variables: "ServiceCreateTerraformModuleComponentConfigRequestVariables" + app_config_id: Union[Unset, str] = UNSET + checksum: Union[Unset, str] = UNSET + connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET + dependencies: Union[Unset, list[str]] = UNSET + drift_schedule: Union[Unset, str] = UNSET + public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET + references: Union[Unset, list[str]] = UNSET + variables_files: Union[Unset, list[str]] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + env_vars = self.env_vars.to_dict() + + variables = self.variables.to_dict() + + app_config_id = self.app_config_id + + checksum = self.checksum + + connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.connected_github_vcs_config, Unset): + connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + drift_schedule = self.drift_schedule + + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.public_git_vcs_config, Unset): + public_git_vcs_config = self.public_git_vcs_config.to_dict() + + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + variables_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.variables_files, Unset): + variables_files = self.variables_files + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "env_vars": env_vars, + "variables": variables, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if checksum is not UNSET: + field_dict["checksum"] = checksum + if connected_github_vcs_config is not UNSET: + field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule + if public_git_vcs_config is not UNSET: + field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if variables_files is not UNSET: + field_dict["variables_files"] = variables_files + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_connected_github_vcs_config_request import ServiceConnectedGithubVCSConfigRequest + from ..models.service_create_terraform_module_component_config_request_env_vars import ( + ServiceCreateTerraformModuleComponentConfigRequestEnvVars, + ) + from ..models.service_create_terraform_module_component_config_request_variables import ( + ServiceCreateTerraformModuleComponentConfigRequestVariables, + ) + from ..models.service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest + + d = dict(src_dict) + env_vars = ServiceCreateTerraformModuleComponentConfigRequestEnvVars.from_dict(d.pop("env_vars")) + + variables = ServiceCreateTerraformModuleComponentConfigRequestVariables.from_dict(d.pop("variables")) + + app_config_id = d.pop("app_config_id", UNSET) + + checksum = d.pop("checksum", UNSET) + + _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) + connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] + if isinstance(_connected_github_vcs_config, Unset): + connected_github_vcs_config = UNSET + else: + connected_github_vcs_config = ServiceConnectedGithubVCSConfigRequest.from_dict(_connected_github_vcs_config) + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + drift_schedule = d.pop("drift_schedule", UNSET) + + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) + public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] + if isinstance(_public_git_vcs_config, Unset): + public_git_vcs_config = UNSET + else: + public_git_vcs_config = ServicePublicGitVCSConfigRequest.from_dict(_public_git_vcs_config) + + references = cast(list[str], d.pop("references", UNSET)) + + variables_files = cast(list[str], d.pop("variables_files", UNSET)) + + version = d.pop("version", UNSET) + + service_create_terraform_module_component_config_request = cls( + env_vars=env_vars, + variables=variables, + app_config_id=app_config_id, + checksum=checksum, + connected_github_vcs_config=connected_github_vcs_config, + dependencies=dependencies, + drift_schedule=drift_schedule, + public_git_vcs_config=public_git_vcs_config, + references=references, + variables_files=variables_files, + version=version, + ) + + service_create_terraform_module_component_config_request.additional_properties = d + return service_create_terraform_module_component_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_module_component_config_request_env_vars.py b/nuon/models/service_create_terraform_module_component_config_request_env_vars.py new file mode 100644 index 00000000..38979419 --- /dev/null +++ b/nuon/models/service_create_terraform_module_component_config_request_env_vars.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateTerraformModuleComponentConfigRequestEnvVars") + + +@_attrs_define +class ServiceCreateTerraformModuleComponentConfigRequestEnvVars: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_terraform_module_component_config_request_env_vars = cls() + + service_create_terraform_module_component_config_request_env_vars.additional_properties = d + return service_create_terraform_module_component_config_request_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_module_component_config_request_variables.py b/nuon/models/service_create_terraform_module_component_config_request_variables.py new file mode 100644 index 00000000..0842ad89 --- /dev/null +++ b/nuon/models/service_create_terraform_module_component_config_request_variables.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateTerraformModuleComponentConfigRequestVariables") + + +@_attrs_define +class ServiceCreateTerraformModuleComponentConfigRequestVariables: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_create_terraform_module_component_config_request_variables = cls() + + service_create_terraform_module_component_config_request_variables.additional_properties = d + return service_create_terraform_module_component_config_request_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_terraform_workspace_request.py b/nuon/models/service_create_terraform_workspace_request.py new file mode 100644 index 00000000..9de9b3f8 --- /dev/null +++ b/nuon/models/service_create_terraform_workspace_request.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateTerraformWorkspaceRequest") + + +@_attrs_define +class ServiceCreateTerraformWorkspaceRequest: + """ + Attributes: + owner_id (str): + owner_type (str): + """ + + owner_id: str + owner_type: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + owner_id = self.owner_id + + owner_type = self.owner_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "owner_id": owner_id, + "owner_type": owner_type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + owner_id = d.pop("owner_id") + + owner_type = d.pop("owner_type") + + service_create_terraform_workspace_request = cls( + owner_id=owner_id, + owner_type=owner_type, + ) + + service_create_terraform_workspace_request.additional_properties = d + return service_create_terraform_workspace_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_user_journey_request.py b/nuon/models/service_create_user_journey_request.py new file mode 100644 index 00000000..7d7d0785 --- /dev/null +++ b/nuon/models/service_create_user_journey_request.py @@ -0,0 +1,89 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_create_user_journey_step_req import ServiceCreateUserJourneyStepReq + + +T = TypeVar("T", bound="ServiceCreateUserJourneyRequest") + + +@_attrs_define +class ServiceCreateUserJourneyRequest: + """ + Attributes: + name (str): + steps (list['ServiceCreateUserJourneyStepReq']): + title (str): + """ + + name: str + steps: list["ServiceCreateUserJourneyStepReq"] + title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "steps": steps, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_user_journey_step_req import ServiceCreateUserJourneyStepReq + + d = dict(src_dict) + name = d.pop("name") + + steps = [] + _steps = d.pop("steps") + for steps_item_data in _steps: + steps_item = ServiceCreateUserJourneyStepReq.from_dict(steps_item_data) + + steps.append(steps_item) + + title = d.pop("title") + + service_create_user_journey_request = cls( + name=name, + steps=steps, + title=title, + ) + + service_create_user_journey_request.additional_properties = d + return service_create_user_journey_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_user_journey_step_req.py b/nuon/models/service_create_user_journey_step_req.py new file mode 100644 index 00000000..93e3eed3 --- /dev/null +++ b/nuon/models/service_create_user_journey_step_req.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateUserJourneyStepReq") + + +@_attrs_define +class ServiceCreateUserJourneyStepReq: + """ + Attributes: + name (str): + title (str): + """ + + name: str + title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + title = d.pop("title") + + service_create_user_journey_step_req = cls( + name=name, + title=title, + ) + + service_create_user_journey_step_req.additional_properties = d + return service_create_user_journey_step_req + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_workflow_step_approval_response_request.py b/nuon/models/service_create_workflow_step_approval_response_request.py new file mode 100644 index 00000000..0e733f57 --- /dev/null +++ b/nuon/models/service_create_workflow_step_approval_response_request.py @@ -0,0 +1,76 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_workflow_step_response_type import AppWorkflowStepResponseType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateWorkflowStepApprovalResponseRequest") + + +@_attrs_define +class ServiceCreateWorkflowStepApprovalResponseRequest: + """ + Attributes: + note (Union[Unset, str]): + response_type (Union[Unset, AppWorkflowStepResponseType]): + """ + + note: Union[Unset, str] = UNSET + response_type: Union[Unset, AppWorkflowStepResponseType] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + note = self.note + + response_type: Union[Unset, str] = UNSET + if not isinstance(self.response_type, Unset): + response_type = self.response_type.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if note is not UNSET: + field_dict["note"] = note + if response_type is not UNSET: + field_dict["response_type"] = response_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + note = d.pop("note", UNSET) + + _response_type = d.pop("response_type", UNSET) + response_type: Union[Unset, AppWorkflowStepResponseType] + if isinstance(_response_type, Unset): + response_type = UNSET + else: + response_type = AppWorkflowStepResponseType(_response_type) + + service_create_workflow_step_approval_response_request = cls( + note=note, + response_type=response_type, + ) + + service_create_workflow_step_approval_response_request.additional_properties = d + return service_create_workflow_step_approval_response_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_create_workflow_step_approval_response_response.py b/nuon/models/service_create_workflow_step_approval_response_response.py new file mode 100644 index 00000000..2415662f --- /dev/null +++ b/nuon/models/service_create_workflow_step_approval_response_response.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateWorkflowStepApprovalResponseResponse") + + +@_attrs_define +class ServiceCreateWorkflowStepApprovalResponseResponse: + """ + Attributes: + id (Union[Unset, str]): + note (Union[Unset, str]): + type_ (Union[Unset, str]): + """ + + id: Union[Unset, str] = UNSET + note: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + note = self.note + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if note is not UNSET: + field_dict["note"] = note + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + note = d.pop("note", UNSET) + + type_ = d.pop("type", UNSET) + + service_create_workflow_step_approval_response_response = cls( + id=id, + note=note, + type_=type_, + ) + + service_create_workflow_step_approval_response_response.additional_properties = d + return service_create_workflow_step_approval_response_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/nuon/models/service_deploy_install_components_request.py b/nuon/models/service_deploy_install_components_request.py new file mode 100644 index 00000000..08be2f8f --- /dev/null +++ b/nuon/models/service_deploy_install_components_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceDeployInstallComponentsRequest") + + +@_attrs_define +class ServiceDeployInstallComponentsRequest: + """ + Attributes: + plan_only (Union[Unset, bool]): + """ + + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_only = d.pop("plan_only", UNSET) + + service_deploy_install_components_request = cls( + plan_only=plan_only, + ) + + service_deploy_install_components_request.additional_properties = d + return service_deploy_install_components_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_deprovision_install_request.py b/nuon/models/service_deprovision_install_request.py new file mode 100644 index 00000000..868b932b --- /dev/null +++ b/nuon/models/service_deprovision_install_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceDeprovisionInstallRequest") + + +@_attrs_define +class ServiceDeprovisionInstallRequest: + """ + Attributes: + error_behavior (Union[Unset, str]): + plan_only (Union[Unset, bool]): + """ + + error_behavior: Union[Unset, str] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + error_behavior = self.error_behavior + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_behavior is not UNSET: + field_dict["error_behavior"] = error_behavior + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_behavior = d.pop("error_behavior", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_deprovision_install_request = cls( + error_behavior=error_behavior, + plan_only=plan_only, + ) + + service_deprovision_install_request.additional_properties = d + return service_deprovision_install_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_deprovision_install_sandbox_request.py b/nuon/models/service_deprovision_install_sandbox_request.py new file mode 100644 index 00000000..79a56d8f --- /dev/null +++ b/nuon/models/service_deprovision_install_sandbox_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceDeprovisionInstallSandboxRequest") + + +@_attrs_define +class ServiceDeprovisionInstallSandboxRequest: + """ + Attributes: + error_behavior (Union[Unset, str]): + plan_only (Union[Unset, bool]): + """ + + error_behavior: Union[Unset, str] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + error_behavior = self.error_behavior + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_behavior is not UNSET: + field_dict["error_behavior"] = error_behavior + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_behavior = d.pop("error_behavior", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_deprovision_install_sandbox_request = cls( + error_behavior=error_behavior, + plan_only=plan_only, + ) + + service_deprovision_install_sandbox_request.additional_properties = d + return service_deprovision_install_sandbox_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_force_shutdown_request.py b/nuon/models/service_force_shutdown_request.py new file mode 100644 index 00000000..1517d85e --- /dev/null +++ b/nuon/models/service_force_shutdown_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceForceShutdownRequest") + + +@_attrs_define +class ServiceForceShutdownRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_force_shutdown_request = cls() + + service_force_shutdown_request.additional_properties = d + return service_force_shutdown_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_forget_install_request.py b/nuon/models/service_forget_install_request.py new file mode 100644 index 00000000..2ced5716 --- /dev/null +++ b/nuon/models/service_forget_install_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceForgetInstallRequest") + + +@_attrs_define +class ServiceForgetInstallRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_forget_install_request = cls() + + service_forget_install_request.additional_properties = d + return service_forget_install_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_graceful_shutdown_request.py b/nuon/models/service_graceful_shutdown_request.py new file mode 100644 index 00000000..c99751f0 --- /dev/null +++ b/nuon/models/service_graceful_shutdown_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceGracefulShutdownRequest") + + +@_attrs_define +class ServiceGracefulShutdownRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_graceful_shutdown_request = cls() + + service_graceful_shutdown_request.additional_properties = d + return service_graceful_shutdown_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_install_phone_home_request.py b/nuon/models/service_install_phone_home_request.py new file mode 100644 index 00000000..cad5630f --- /dev/null +++ b/nuon/models/service_install_phone_home_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceInstallPhoneHomeRequest") + + +@_attrs_define +class ServiceInstallPhoneHomeRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_install_phone_home_request = cls() + + service_install_phone_home_request.additional_properties = d + return service_install_phone_home_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_latest_runner_heart_beats.py b/nuon/models/service_latest_runner_heart_beats.py new file mode 100644 index 00000000..4478747f --- /dev/null +++ b/nuon/models/service_latest_runner_heart_beats.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.app_latest_runner_heart_beat import AppLatestRunnerHeartBeat + + +T = TypeVar("T", bound="ServiceLatestRunnerHeartBeats") + + +@_attrs_define +class ServiceLatestRunnerHeartBeats: + """ """ + + additional_properties: dict[str, "AppLatestRunnerHeartBeat"] = _attrs_field(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(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_latest_runner_heart_beat import AppLatestRunnerHeartBeat + + d = dict(src_dict) + service_latest_runner_heart_beats = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = AppLatestRunnerHeartBeat.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + service_latest_runner_heart_beats.additional_properties = additional_properties + return service_latest_runner_heart_beats + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "AppLatestRunnerHeartBeat": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "AppLatestRunnerHeartBeat") -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_mng_shut_down_request.py b/nuon/models/service_mng_shut_down_request.py new file mode 100644 index 00000000..6bd0f457 --- /dev/null +++ b/nuon/models/service_mng_shut_down_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceMngShutDownRequest") + + +@_attrs_define +class ServiceMngShutDownRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_mng_shut_down_request = cls() + + service_mng_shut_down_request.additional_properties = d + return service_mng_shut_down_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_mng_update_request.py b/nuon/models/service_mng_update_request.py new file mode 100644 index 00000000..bede9163 --- /dev/null +++ b/nuon/models/service_mng_update_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceMngUpdateRequest") + + +@_attrs_define +class ServiceMngUpdateRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_mng_update_request = cls() + + service_mng_update_request.additional_properties = d + return service_mng_update_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_mng_vm_shut_down_request.py b/nuon/models/service_mng_vm_shut_down_request.py new file mode 100644 index 00000000..47313084 --- /dev/null +++ b/nuon/models/service_mng_vm_shut_down_request.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceMngVMShutDownRequest") + + +@_attrs_define +class ServiceMngVMShutDownRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_mng_vm_shut_down_request = cls() + + service_mng_vm_shut_down_request.additional_properties = d + return service_mng_vm_shut_down_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_patch_install_config_params.py b/nuon/models/service_patch_install_config_params.py new file mode 100644 index 00000000..0608b1c3 --- /dev/null +++ b/nuon/models/service_patch_install_config_params.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServicePatchInstallConfigParams") + + +@_attrs_define +class ServicePatchInstallConfigParams: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + service_patch_install_config_params = cls( + approval_option=approval_option, + ) + + service_patch_install_config_params.additional_properties = d + return service_patch_install_config_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_public_git_vcs_action_workflow_config_request.py b/nuon/models/service_public_git_vcs_action_workflow_config_request.py new file mode 100644 index 00000000..5f2ee9b4 --- /dev/null +++ b/nuon/models/service_public_git_vcs_action_workflow_config_request.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServicePublicGitVCSActionWorkflowConfigRequest") + + +@_attrs_define +class ServicePublicGitVCSActionWorkflowConfigRequest: + """ + Attributes: + branch (str): + directory (str): + repo (str): + """ + + branch: str + directory: str + repo: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + branch = self.branch + + directory = self.directory + + repo = self.repo + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "branch": branch, + "directory": directory, + "repo": repo, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + branch = d.pop("branch") + + directory = d.pop("directory") + + repo = d.pop("repo") + + service_public_git_vcs_action_workflow_config_request = cls( + branch=branch, + directory=directory, + repo=repo, + ) + + service_public_git_vcs_action_workflow_config_request.additional_properties = d + return service_public_git_vcs_action_workflow_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_public_git_vcs_config_request.py b/nuon/models/service_public_git_vcs_config_request.py new file mode 100644 index 00000000..6c545a4b --- /dev/null +++ b/nuon/models/service_public_git_vcs_config_request.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServicePublicGitVCSConfigRequest") + + +@_attrs_define +class ServicePublicGitVCSConfigRequest: + """ + Attributes: + branch (str): + directory (str): + repo (str): + """ + + branch: str + directory: str + repo: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + branch = self.branch + + directory = self.directory + + repo = self.repo + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "branch": branch, + "directory": directory, + "repo": repo, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + branch = d.pop("branch") + + directory = d.pop("directory") + + repo = d.pop("repo") + + service_public_git_vcs_config_request = cls( + branch=branch, + directory=directory, + repo=repo, + ) + + service_public_git_vcs_config_request.additional_properties = d + return service_public_git_vcs_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_public_git_vcs_sandbox_config_request.py b/nuon/models/service_public_git_vcs_sandbox_config_request.py new file mode 100644 index 00000000..ae5f0246 --- /dev/null +++ b/nuon/models/service_public_git_vcs_sandbox_config_request.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServicePublicGitVCSSandboxConfigRequest") + + +@_attrs_define +class ServicePublicGitVCSSandboxConfigRequest: + """ + Attributes: + branch (str): + directory (str): + repo (str): + """ + + branch: str + directory: str + repo: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + branch = self.branch + + directory = self.directory + + repo = self.repo + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "branch": branch, + "directory": directory, + "repo": repo, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + branch = d.pop("branch") + + directory = d.pop("directory") + + repo = d.pop("repo") + + service_public_git_vcs_sandbox_config_request = cls( + branch=branch, + directory=directory, + repo=repo, + ) + + service_public_git_vcs_sandbox_config_request.additional_properties = d + return service_public_git_vcs_sandbox_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_readme.py b/nuon/models/service_readme.py new file mode 100644 index 00000000..c7bf1790 --- /dev/null +++ b/nuon/models/service_readme.py @@ -0,0 +1,79 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceReadme") + + +@_attrs_define +class ServiceReadme: + """ + Attributes: + original (Union[Unset, str]): + readme (Union[Unset, str]): + warnings (Union[Unset, list[str]]): + """ + + original: Union[Unset, str] = UNSET + readme: Union[Unset, str] = UNSET + warnings: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + original = self.original + + readme = self.readme + + warnings: Union[Unset, list[str]] = UNSET + if not isinstance(self.warnings, Unset): + warnings = self.warnings + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if original is not UNSET: + field_dict["original"] = original + if readme is not UNSET: + field_dict["readme"] = readme + if warnings is not UNSET: + field_dict["warnings"] = warnings + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + original = d.pop("original", UNSET) + + readme = d.pop("readme", UNSET) + + warnings = cast(list[str], d.pop("warnings", UNSET)) + + service_readme = cls( + original=original, + readme=readme, + warnings=warnings, + ) + + service_readme.additional_properties = d + return service_readme + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_remove_org_user_request.py b/nuon/models/service_remove_org_user_request.py new file mode 100644 index 00000000..196e72bd --- /dev/null +++ b/nuon/models/service_remove_org_user_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRemoveOrgUserRequest") + + +@_attrs_define +class ServiceRemoveOrgUserRequest: + """ + Attributes: + user_id (Union[Unset, str]): + """ + + user_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = self.user_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = d.pop("user_id", UNSET) + + service_remove_org_user_request = cls( + user_id=user_id, + ) + + service_remove_org_user_request.additional_properties = d + return service_remove_org_user_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_rendered_installer.py b/nuon/models/service_rendered_installer.py new file mode 100644 index 00000000..396d910a --- /dev/null +++ b/nuon/models/service_rendered_installer.py @@ -0,0 +1,102 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_app import AppApp + from ..models.app_installer_metadata import AppInstallerMetadata + + +T = TypeVar("T", bound="ServiceRenderedInstaller") + + +@_attrs_define +class ServiceRenderedInstaller: + """ + Attributes: + apps (Union[Unset, list['AppApp']]): + metadata (Union[Unset, AppInstallerMetadata]): + sandbox_mode (Union[Unset, bool]): + """ + + apps: Union[Unset, list["AppApp"]] = UNSET + metadata: Union[Unset, "AppInstallerMetadata"] = UNSET + sandbox_mode: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + apps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.apps, Unset): + apps = [] + for apps_item_data in self.apps: + apps_item = apps_item_data.to_dict() + apps.append(apps_item) + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + sandbox_mode = self.sandbox_mode + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if apps is not UNSET: + field_dict["apps"] = apps + if metadata is not UNSET: + field_dict["metadata"] = metadata + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app import AppApp + from ..models.app_installer_metadata import AppInstallerMetadata + + d = dict(src_dict) + apps = [] + _apps = d.pop("apps", UNSET) + for apps_item_data in _apps or []: + apps_item = AppApp.from_dict(apps_item_data) + + apps.append(apps_item) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppInstallerMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppInstallerMetadata.from_dict(_metadata) + + sandbox_mode = d.pop("sandbox_mode", UNSET) + + service_rendered_installer = cls( + apps=apps, + metadata=metadata, + sandbox_mode=sandbox_mode, + ) + + service_rendered_installer.additional_properties = d + return service_rendered_installer + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_reprovision_install_request.py b/nuon/models/service_reprovision_install_request.py new file mode 100644 index 00000000..19521696 --- /dev/null +++ b/nuon/models/service_reprovision_install_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceReprovisionInstallRequest") + + +@_attrs_define +class ServiceReprovisionInstallRequest: + """ + Attributes: + plan_only (Union[Unset, bool]): + """ + + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_only = d.pop("plan_only", UNSET) + + service_reprovision_install_request = cls( + plan_only=plan_only, + ) + + service_reprovision_install_request.additional_properties = d + return service_reprovision_install_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_reprovision_install_sandbox_request.py b/nuon/models/service_reprovision_install_sandbox_request.py new file mode 100644 index 00000000..1740843b --- /dev/null +++ b/nuon/models/service_reprovision_install_sandbox_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceReprovisionInstallSandboxRequest") + + +@_attrs_define +class ServiceReprovisionInstallSandboxRequest: + """ + Attributes: + plan_only (Union[Unset, bool]): + """ + + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_only = d.pop("plan_only", UNSET) + + service_reprovision_install_sandbox_request = cls( + plan_only=plan_only, + ) + + service_reprovision_install_sandbox_request.additional_properties = d + return service_reprovision_install_sandbox_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_retry_workflow_by_id_request.py b/nuon/models/service_retry_workflow_by_id_request.py new file mode 100644 index 00000000..862f14f0 --- /dev/null +++ b/nuon/models/service_retry_workflow_by_id_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowByIDRequest") + + +@_attrs_define +class ServiceRetryWorkflowByIDRequest: + """ + Attributes: + operation (Union[Unset, str]): Retry indicates whether to retry the current step or not + step_id (Union[Unset, str]): StepID is the ID of the step to start the retry from + """ + + operation: Union[Unset, str] = UNSET + step_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + operation = self.operation + + step_id = self.step_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if operation is not UNSET: + field_dict["operation"] = operation + if step_id is not UNSET: + field_dict["step_id"] = step_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + operation = d.pop("operation", UNSET) + + step_id = d.pop("step_id", UNSET) + + service_retry_workflow_by_id_request = cls( + operation=operation, + step_id=step_id, + ) + + service_retry_workflow_by_id_request.additional_properties = d + return service_retry_workflow_by_id_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_retry_workflow_by_id_response.py b/nuon/models/service_retry_workflow_by_id_response.py new file mode 100644 index 00000000..dc310ac0 --- /dev/null +++ b/nuon/models/service_retry_workflow_by_id_response.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowByIDResponse") + + +@_attrs_define +class ServiceRetryWorkflowByIDResponse: + """ + Attributes: + workflow_id (Union[Unset, str]): + """ + + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workflow_id = d.pop("workflow_id", UNSET) + + service_retry_workflow_by_id_response = cls( + workflow_id=workflow_id, + ) + + service_retry_workflow_by_id_response.additional_properties = d + return service_retry_workflow_by_id_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/nuon/models/service_retry_workflow_request.py b/nuon/models/service_retry_workflow_request.py new file mode 100644 index 00000000..ed24f7e2 --- /dev/null +++ b/nuon/models/service_retry_workflow_request.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowRequest") + + +@_attrs_define +class ServiceRetryWorkflowRequest: + """ + Attributes: + operation (Union[Unset, str]): Retry indicates whether to retry the current step or not + step_id (Union[Unset, str]): StepID is the ID of the step to start the retry from + workflow_id (Union[Unset, str]): + """ + + operation: Union[Unset, str] = UNSET + step_id: Union[Unset, str] = UNSET + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + operation = self.operation + + step_id = self.step_id + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if operation is not UNSET: + field_dict["operation"] = operation + if step_id is not UNSET: + field_dict["step_id"] = step_id + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + operation = d.pop("operation", UNSET) + + step_id = d.pop("step_id", UNSET) + + workflow_id = d.pop("workflow_id", UNSET) + + service_retry_workflow_request = cls( + operation=operation, + step_id=step_id, + workflow_id=workflow_id, + ) + + service_retry_workflow_request.additional_properties = d + return service_retry_workflow_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_retry_workflow_response.py b/nuon/models/service_retry_workflow_response.py new file mode 100644 index 00000000..d21141fd --- /dev/null +++ b/nuon/models/service_retry_workflow_response.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowResponse") + + +@_attrs_define +class ServiceRetryWorkflowResponse: + """ + Attributes: + workflow_id (Union[Unset, str]): + """ + + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workflow_id = d.pop("workflow_id", UNSET) + + service_retry_workflow_response = cls( + workflow_id=workflow_id, + ) + + service_retry_workflow_response.additional_properties = d + return service_retry_workflow_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/nuon/models/service_retry_workflow_step_response.py b/nuon/models/service_retry_workflow_step_response.py new file mode 100644 index 00000000..e8de15b0 --- /dev/null +++ b/nuon/models/service_retry_workflow_step_response.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowStepResponse") + + +@_attrs_define +class ServiceRetryWorkflowStepResponse: + """ + Attributes: + workflow_id (Union[Unset, str]): + """ + + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workflow_id = d.pop("workflow_id", UNSET) + + service_retry_workflow_step_response = cls( + workflow_id=workflow_id, + ) + + service_retry_workflow_step_response.additional_properties = d + return service_retry_workflow_step_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/nuon/models/service_runner_connection_status.py b/nuon/models/service_runner_connection_status.py new file mode 100644 index 00000000..74612f3b --- /dev/null +++ b/nuon/models/service_runner_connection_status.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRunnerConnectionStatus") + + +@_attrs_define +class ServiceRunnerConnectionStatus: + """ + Attributes: + connected (Union[Unset, bool]): + latest_heartbeat_timestamp (Union[Unset, int]): + """ + + connected: Union[Unset, bool] = UNSET + latest_heartbeat_timestamp: Union[Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + connected = self.connected + + latest_heartbeat_timestamp = self.latest_heartbeat_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if connected is not UNSET: + field_dict["connected"] = connected + if latest_heartbeat_timestamp is not UNSET: + field_dict["latest_heartbeat_timestamp"] = latest_heartbeat_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + connected = d.pop("connected", UNSET) + + latest_heartbeat_timestamp = d.pop("latest_heartbeat_timestamp", UNSET) + + service_runner_connection_status = cls( + connected=connected, + latest_heartbeat_timestamp=latest_heartbeat_timestamp, + ) + + service_runner_connection_status.additional_properties = d + return service_runner_connection_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/nuon/models/service_sync_secrets_request.py b/nuon/models/service_sync_secrets_request.py new file mode 100644 index 00000000..9931f0bf --- /dev/null +++ b/nuon/models/service_sync_secrets_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceSyncSecretsRequest") + + +@_attrs_define +class ServiceSyncSecretsRequest: + """ + Attributes: + plan_only (Union[Unset, bool]): + """ + + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_only = d.pop("plan_only", UNSET) + + service_sync_secrets_request = cls( + plan_only=plan_only, + ) + + service_sync_secrets_request.additional_properties = d + return service_sync_secrets_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_teardown_install_component_request.py b/nuon/models/service_teardown_install_component_request.py new file mode 100644 index 00000000..db4d1c72 --- /dev/null +++ b/nuon/models/service_teardown_install_component_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceTeardownInstallComponentRequest") + + +@_attrs_define +class ServiceTeardownInstallComponentRequest: + """ + Attributes: + error_behavior (Union[Unset, str]): + plan_only (Union[Unset, bool]): + """ + + error_behavior: Union[Unset, str] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + error_behavior = self.error_behavior + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_behavior is not UNSET: + field_dict["error_behavior"] = error_behavior + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_behavior = d.pop("error_behavior", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_teardown_install_component_request = cls( + error_behavior=error_behavior, + plan_only=plan_only, + ) + + service_teardown_install_component_request.additional_properties = d + return service_teardown_install_component_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_teardown_install_components_request.py b/nuon/models/service_teardown_install_components_request.py new file mode 100644 index 00000000..e9b64781 --- /dev/null +++ b/nuon/models/service_teardown_install_components_request.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceTeardownInstallComponentsRequest") + + +@_attrs_define +class ServiceTeardownInstallComponentsRequest: + """ + Attributes: + error_behavior (Union[Unset, str]): + plan_only (Union[Unset, bool]): + """ + + error_behavior: Union[Unset, str] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + error_behavior = self.error_behavior + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_behavior is not UNSET: + field_dict["error_behavior"] = error_behavior + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_behavior = d.pop("error_behavior", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_teardown_install_components_request = cls( + error_behavior=error_behavior, + plan_only=plan_only, + ) + + service_teardown_install_components_request.additional_properties = d + return service_teardown_install_components_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_action_workflow_request.py b/nuon/models/service_update_action_workflow_request.py new file mode 100644 index 00000000..7b1e2396 --- /dev/null +++ b/nuon/models/service_update_action_workflow_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateActionWorkflowRequest") + + +@_attrs_define +class ServiceUpdateActionWorkflowRequest: + """ + Attributes: + name (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + service_update_action_workflow_request = cls( + name=name, + ) + + service_update_action_workflow_request.additional_properties = d + return service_update_action_workflow_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_app_config_installs_request.py b/nuon/models/service_update_app_config_installs_request.py new file mode 100644 index 00000000..efcb0966 --- /dev/null +++ b/nuon/models/service_update_app_config_installs_request.py @@ -0,0 +1,70 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateAppConfigInstallsRequest") + + +@_attrs_define +class ServiceUpdateAppConfigInstallsRequest: + """ + Attributes: + install_i_ds (Union[Unset, list[str]]): + update_all (Union[Unset, bool]): + """ + + install_i_ds: Union[Unset, list[str]] = UNSET + update_all: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + install_i_ds: Union[Unset, list[str]] = UNSET + if not isinstance(self.install_i_ds, Unset): + install_i_ds = self.install_i_ds + + update_all = self.update_all + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if install_i_ds is not UNSET: + field_dict["installIDs"] = install_i_ds + if update_all is not UNSET: + field_dict["updateAll"] = update_all + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + install_i_ds = cast(list[str], d.pop("installIDs", UNSET)) + + update_all = d.pop("updateAll", UNSET) + + service_update_app_config_installs_request = cls( + install_i_ds=install_i_ds, + update_all=update_all, + ) + + service_update_app_config_installs_request.additional_properties = d + return service_update_app_config_installs_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_app_config_request.py b/nuon/models/service_update_app_config_request.py new file mode 100644 index 00000000..38f45104 --- /dev/null +++ b/nuon/models/service_update_app_config_request.py @@ -0,0 +1,96 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_app_config_status import AppAppConfigStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateAppConfigRequest") + + +@_attrs_define +class ServiceUpdateAppConfigRequest: + """ + Attributes: + component_ids (Union[Unset, list[str]]): + state (Union[Unset, str]): + status (Union[Unset, AppAppConfigStatus]): + status_description (Union[Unset, str]): + """ + + component_ids: Union[Unset, list[str]] = UNSET + state: Union[Unset, str] = UNSET + status: Union[Unset, AppAppConfigStatus] = UNSET + status_description: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + component_ids: Union[Unset, list[str]] = UNSET + if not isinstance(self.component_ids, Unset): + component_ids = self.component_ids + + state = self.state + + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_description = self.status_description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if component_ids is not UNSET: + field_dict["component_ids"] = component_ids + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if status_description is not UNSET: + field_dict["status_description"] = status_description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + component_ids = cast(list[str], d.pop("component_ids", UNSET)) + + state = d.pop("state", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AppAppConfigStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AppAppConfigStatus(_status) + + status_description = d.pop("status_description", UNSET) + + service_update_app_config_request = cls( + component_ids=component_ids, + state=state, + status=status, + status_description=status_description, + ) + + service_update_app_config_request.additional_properties = d + return service_update_app_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_app_request.py b/nuon/models/service_update_app_request.py new file mode 100644 index 00000000..4c56ec99 --- /dev/null +++ b/nuon/models/service_update_app_request.py @@ -0,0 +1,104 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateAppRequest") + + +@_attrs_define +class ServiceUpdateAppRequest: + """ + Attributes: + config_directory (Union[Unset, str]): + config_repo (Union[Unset, str]): + description (Union[Unset, str]): + display_name (Union[Unset, str]): + name (Union[Unset, str]): + slack_webhook_url (Union[Unset, str]): + """ + + config_directory: Union[Unset, str] = UNSET + config_repo: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + display_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + slack_webhook_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config_directory = self.config_directory + + config_repo = self.config_repo + + description = self.description + + display_name = self.display_name + + name = self.name + + slack_webhook_url = self.slack_webhook_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if config_directory is not UNSET: + field_dict["config_directory"] = config_directory + if config_repo is not UNSET: + field_dict["config_repo"] = config_repo + if description is not UNSET: + field_dict["description"] = description + if display_name is not UNSET: + field_dict["display_name"] = display_name + if name is not UNSET: + field_dict["name"] = name + if slack_webhook_url is not UNSET: + field_dict["slack_webhook_url"] = slack_webhook_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + config_directory = d.pop("config_directory", UNSET) + + config_repo = d.pop("config_repo", UNSET) + + description = d.pop("description", UNSET) + + display_name = d.pop("display_name", UNSET) + + name = d.pop("name", UNSET) + + slack_webhook_url = d.pop("slack_webhook_url", UNSET) + + service_update_app_request = cls( + config_directory=config_directory, + config_repo=config_repo, + description=description, + display_name=display_name, + name=name, + slack_webhook_url=slack_webhook_url, + ) + + service_update_app_request.additional_properties = d + return service_update_app_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_component_request.py b/nuon/models/service_update_component_request.py new file mode 100644 index 00000000..d24b2122 --- /dev/null +++ b/nuon/models/service_update_component_request.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateComponentRequest") + + +@_attrs_define +class ServiceUpdateComponentRequest: + """ + Attributes: + name (str): + dependencies (Union[Unset, list[str]]): + var_name (Union[Unset, str]): + """ + + name: str + dependencies: Union[Unset, list[str]] = UNSET + var_name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + dependencies: Union[Unset, list[str]] = UNSET + if not isinstance(self.dependencies, Unset): + dependencies = self.dependencies + + var_name = self.var_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if var_name is not UNSET: + field_dict["var_name"] = var_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + dependencies = cast(list[str], d.pop("dependencies", UNSET)) + + var_name = d.pop("var_name", UNSET) + + service_update_component_request = cls( + name=name, + dependencies=dependencies, + var_name=var_name, + ) + + service_update_component_request.additional_properties = d + return service_update_component_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_install_config_request.py b/nuon/models/service_update_install_config_request.py new file mode 100644 index 00000000..dc94b9cd --- /dev/null +++ b/nuon/models/service_update_install_config_request.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateInstallConfigRequest") + + +@_attrs_define +class ServiceUpdateInstallConfigRequest: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + service_update_install_config_request = cls( + approval_option=approval_option, + ) + + service_update_install_config_request.additional_properties = d + return service_update_install_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_install_inputs_request.py b/nuon/models/service_update_install_inputs_request.py new file mode 100644 index 00000000..f0d28503 --- /dev/null +++ b/nuon/models/service_update_install_inputs_request.py @@ -0,0 +1,65 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_update_install_inputs_request_inputs import ServiceUpdateInstallInputsRequestInputs + + +T = TypeVar("T", bound="ServiceUpdateInstallInputsRequest") + + +@_attrs_define +class ServiceUpdateInstallInputsRequest: + """ + Attributes: + inputs (ServiceUpdateInstallInputsRequestInputs): + """ + + inputs: "ServiceUpdateInstallInputsRequestInputs" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + inputs = self.inputs.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "inputs": inputs, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_update_install_inputs_request_inputs import ServiceUpdateInstallInputsRequestInputs + + d = dict(src_dict) + inputs = ServiceUpdateInstallInputsRequestInputs.from_dict(d.pop("inputs")) + + service_update_install_inputs_request = cls( + inputs=inputs, + ) + + service_update_install_inputs_request.additional_properties = d + return service_update_install_inputs_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_install_inputs_request_inputs.py b/nuon/models/service_update_install_inputs_request_inputs.py new file mode 100644 index 00000000..66fc7ad4 --- /dev/null +++ b/nuon/models/service_update_install_inputs_request_inputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceUpdateInstallInputsRequestInputs") + + +@_attrs_define +class ServiceUpdateInstallInputsRequestInputs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_update_install_inputs_request_inputs = cls() + + service_update_install_inputs_request_inputs.additional_properties = d + return service_update_install_inputs_request_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_install_request.py b/nuon/models/service_update_install_request.py new file mode 100644 index 00000000..cb81b4bf --- /dev/null +++ b/nuon/models/service_update_install_request.py @@ -0,0 +1,99 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_patch_install_config_params import ServicePatchInstallConfigParams + + +T = TypeVar("T", bound="ServiceUpdateInstallRequest") + + +@_attrs_define +class ServiceUpdateInstallRequest: + """ + Attributes: + install_config (Union[Unset, ServicePatchInstallConfigParams]): + metadata (Union[Unset, HelpersInstallMetadata]): + name (Union[Unset, str]): + """ + + install_config: Union[Unset, "ServicePatchInstallConfigParams"] = UNSET + metadata: Union[Unset, "HelpersInstallMetadata"] = UNSET + name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + install_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_config, Unset): + install_config = self.install_config.to_dict() + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if install_config is not UNSET: + field_dict["install_config"] = install_config + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_patch_install_config_params import ServicePatchInstallConfigParams + + d = dict(src_dict) + _install_config = d.pop("install_config", UNSET) + install_config: Union[Unset, ServicePatchInstallConfigParams] + if isinstance(_install_config, Unset): + install_config = UNSET + else: + install_config = ServicePatchInstallConfigParams.from_dict(_install_config) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, HelpersInstallMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = HelpersInstallMetadata.from_dict(_metadata) + + name = d.pop("name", UNSET) + + service_update_install_request = cls( + install_config=install_config, + metadata=metadata, + name=name, + ) + + service_update_install_request.additional_properties = d + return service_update_install_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_installer_request.py b/nuon/models/service_update_installer_request.py new file mode 100644 index 00000000..573af4cb --- /dev/null +++ b/nuon/models/service_update_installer_request.py @@ -0,0 +1,91 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata + + +T = TypeVar("T", bound="ServiceUpdateInstallerRequest") + + +@_attrs_define +class ServiceUpdateInstallerRequest: + """ + Attributes: + app_ids (list[str]): + name (str): + metadata (Union[Unset, ServiceUpdateInstallerRequestMetadata]): + """ + + app_ids: list[str] + name: str + metadata: Union[Unset, "ServiceUpdateInstallerRequestMetadata"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_ids = self.app_ids + + name = self.name + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "app_ids": app_ids, + "name": name, + } + ) + if metadata is not UNSET: + field_dict["metadata"] = metadata + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata + + d = dict(src_dict) + app_ids = cast(list[str], d.pop("app_ids")) + + name = d.pop("name") + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, ServiceUpdateInstallerRequestMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = ServiceUpdateInstallerRequestMetadata.from_dict(_metadata) + + service_update_installer_request = cls( + app_ids=app_ids, + name=name, + metadata=metadata, + ) + + service_update_installer_request.additional_properties = d + return service_update_installer_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_installer_request_metadata.py b/nuon/models/service_update_installer_request_metadata.py new file mode 100644 index 00000000..f443e9cf --- /dev/null +++ b/nuon/models/service_update_installer_request_metadata.py @@ -0,0 +1,154 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateInstallerRequestMetadata") + + +@_attrs_define +class ServiceUpdateInstallerRequestMetadata: + """ + Attributes: + community_url (str): + description (str): + documentation_url (str): + favicon_url (str): + github_url (str): + homepage_url (str): + logo_url (str): + copyright_markdown (Union[Unset, str]): + demo_url (Union[Unset, str]): + footer_markdown (Union[Unset, str]): + og_image_url (Union[Unset, str]): + post_install_markdown (Union[Unset, str]): + """ + + community_url: str + description: str + documentation_url: str + favicon_url: str + github_url: str + homepage_url: str + logo_url: str + copyright_markdown: Union[Unset, str] = UNSET + demo_url: Union[Unset, str] = UNSET + footer_markdown: Union[Unset, str] = UNSET + og_image_url: Union[Unset, str] = UNSET + post_install_markdown: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + community_url = self.community_url + + description = self.description + + documentation_url = self.documentation_url + + favicon_url = self.favicon_url + + github_url = self.github_url + + homepage_url = self.homepage_url + + logo_url = self.logo_url + + copyright_markdown = self.copyright_markdown + + demo_url = self.demo_url + + footer_markdown = self.footer_markdown + + og_image_url = self.og_image_url + + post_install_markdown = self.post_install_markdown + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "community_url": community_url, + "description": description, + "documentation_url": documentation_url, + "favicon_url": favicon_url, + "github_url": github_url, + "homepage_url": homepage_url, + "logo_url": logo_url, + } + ) + if copyright_markdown is not UNSET: + field_dict["copyright_markdown"] = copyright_markdown + if demo_url is not UNSET: + field_dict["demo_url"] = demo_url + if footer_markdown is not UNSET: + field_dict["footer_markdown"] = footer_markdown + if og_image_url is not UNSET: + field_dict["og_image_url"] = og_image_url + if post_install_markdown is not UNSET: + field_dict["post_install_markdown"] = post_install_markdown + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + community_url = d.pop("community_url") + + description = d.pop("description") + + documentation_url = d.pop("documentation_url") + + favicon_url = d.pop("favicon_url") + + github_url = d.pop("github_url") + + homepage_url = d.pop("homepage_url") + + logo_url = d.pop("logo_url") + + copyright_markdown = d.pop("copyright_markdown", UNSET) + + demo_url = d.pop("demo_url", UNSET) + + footer_markdown = d.pop("footer_markdown", UNSET) + + og_image_url = d.pop("og_image_url", UNSET) + + post_install_markdown = d.pop("post_install_markdown", UNSET) + + service_update_installer_request_metadata = cls( + community_url=community_url, + description=description, + documentation_url=documentation_url, + favicon_url=favicon_url, + github_url=github_url, + homepage_url=homepage_url, + logo_url=logo_url, + copyright_markdown=copyright_markdown, + demo_url=demo_url, + footer_markdown=footer_markdown, + og_image_url=og_image_url, + post_install_markdown=post_install_markdown, + ) + + service_update_installer_request_metadata.additional_properties = d + return service_update_installer_request_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/nuon/models/service_update_org_request.py b/nuon/models/service_update_org_request.py new file mode 100644 index 00000000..6ea62635 --- /dev/null +++ b/nuon/models/service_update_org_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceUpdateOrgRequest") + + +@_attrs_define +class ServiceUpdateOrgRequest: + """ + Attributes: + name (str): + """ + + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + service_update_org_request = cls( + name=name, + ) + + service_update_org_request.additional_properties = d + return service_update_org_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_runner_settings_request.py b/nuon/models/service_update_runner_settings_request.py new file mode 100644 index 00000000..06a80ea1 --- /dev/null +++ b/nuon/models/service_update_runner_settings_request.py @@ -0,0 +1,104 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateRunnerSettingsRequest") + + +@_attrs_define +class ServiceUpdateRunnerSettingsRequest: + """ + Attributes: + aws_max_instance_lifetime (Union[Unset, int]): + container_image_tag (Union[Unset, str]): + container_image_url (Union[Unset, str]): + org_awsiam_role_arn (Union[Unset, str]): + org_k8s_service_account_name (Union[Unset, str]): + runner_api_url (Union[Unset, str]): + """ + + aws_max_instance_lifetime: Union[Unset, int] = UNSET + container_image_tag: Union[Unset, str] = UNSET + container_image_url: Union[Unset, str] = UNSET + org_awsiam_role_arn: Union[Unset, str] = UNSET + org_k8s_service_account_name: Union[Unset, str] = UNSET + runner_api_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_max_instance_lifetime = self.aws_max_instance_lifetime + + container_image_tag = self.container_image_tag + + container_image_url = self.container_image_url + + org_awsiam_role_arn = self.org_awsiam_role_arn + + org_k8s_service_account_name = self.org_k8s_service_account_name + + runner_api_url = self.runner_api_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_max_instance_lifetime is not UNSET: + field_dict["aws_max_instance_lifetime"] = aws_max_instance_lifetime + if container_image_tag is not UNSET: + field_dict["container_image_tag"] = container_image_tag + if container_image_url is not UNSET: + field_dict["container_image_url"] = container_image_url + if org_awsiam_role_arn is not UNSET: + field_dict["org_awsiam_role_arn"] = org_awsiam_role_arn + if org_k8s_service_account_name is not UNSET: + field_dict["org_k8s_service_account_name"] = org_k8s_service_account_name + if runner_api_url is not UNSET: + field_dict["runner_api_url"] = runner_api_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + aws_max_instance_lifetime = d.pop("aws_max_instance_lifetime", UNSET) + + container_image_tag = d.pop("container_image_tag", UNSET) + + container_image_url = d.pop("container_image_url", UNSET) + + org_awsiam_role_arn = d.pop("org_awsiam_role_arn", UNSET) + + org_k8s_service_account_name = d.pop("org_k8s_service_account_name", UNSET) + + runner_api_url = d.pop("runner_api_url", UNSET) + + service_update_runner_settings_request = cls( + aws_max_instance_lifetime=aws_max_instance_lifetime, + container_image_tag=container_image_tag, + container_image_url=container_image_url, + org_awsiam_role_arn=org_awsiam_role_arn, + org_k8s_service_account_name=org_k8s_service_account_name, + runner_api_url=runner_api_url, + ) + + service_update_runner_settings_request.additional_properties = d + return service_update_runner_settings_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_user_journey_step_request.py b/nuon/models/service_update_user_journey_step_request.py new file mode 100644 index 00000000..9884e6b8 --- /dev/null +++ b/nuon/models/service_update_user_journey_step_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateUserJourneyStepRequest") + + +@_attrs_define +class ServiceUpdateUserJourneyStepRequest: + """ + Attributes: + complete (Union[Unset, bool]): + """ + + complete: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + complete = self.complete + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if complete is not UNSET: + field_dict["complete"] = complete + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + complete = d.pop("complete", UNSET) + + service_update_user_journey_step_request = cls( + complete=complete, + ) + + service_update_user_journey_step_request.additional_properties = d + return service_update_user_journey_step_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_update_workflow_request.py b/nuon/models/service_update_workflow_request.py new file mode 100644 index 00000000..45b3eaf6 --- /dev/null +++ b/nuon/models/service_update_workflow_request.py @@ -0,0 +1,61 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption + +T = TypeVar("T", bound="ServiceUpdateWorkflowRequest") + + +@_attrs_define +class ServiceUpdateWorkflowRequest: + """ + Attributes: + approval_option (AppInstallApprovalOption): + """ + + approval_option: AppInstallApprovalOption + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option = self.approval_option.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "approval_option": approval_option, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + approval_option = AppInstallApprovalOption(d.pop("approval_option")) + + service_update_workflow_request = cls( + approval_option=approval_option, + ) + + service_update_workflow_request.additional_properties = d + return service_update_workflow_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/service_waitlist_request.py b/nuon/models/service_waitlist_request.py new file mode 100644 index 00000000..11398956 --- /dev/null +++ b/nuon/models/service_waitlist_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceWaitlistRequest") + + +@_attrs_define +class ServiceWaitlistRequest: + """ + Attributes: + org_name (str): + """ + + org_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + org_name = self.org_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "org_name": org_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + org_name = d.pop("org_name") + + service_waitlist_request = cls( + org_name=org_name, + ) + + service_waitlist_request.additional_properties = d + return service_waitlist_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_action_workflow_state.py b/nuon/models/state_action_workflow_state.py new file mode 100644 index 00000000..fed5232a --- /dev/null +++ b/nuon/models/state_action_workflow_state.py @@ -0,0 +1,99 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_action_workflow_state_outputs import StateActionWorkflowStateOutputs + + +T = TypeVar("T", bound="StateActionWorkflowState") + + +@_attrs_define +class StateActionWorkflowState: + """ + Attributes: + id (Union[Unset, str]): + outputs (Union[Unset, StateActionWorkflowStateOutputs]): + populated (Union[Unset, bool]): + status (Union[Unset, str]): + """ + + id: Union[Unset, str] = UNSET + outputs: Union[Unset, "StateActionWorkflowStateOutputs"] = UNSET + populated: Union[Unset, bool] = UNSET + status: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + populated = self.populated + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if outputs is not UNSET: + field_dict["outputs"] = outputs + if populated is not UNSET: + field_dict["populated"] = populated + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_action_workflow_state_outputs import StateActionWorkflowStateOutputs + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, StateActionWorkflowStateOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = StateActionWorkflowStateOutputs.from_dict(_outputs) + + populated = d.pop("populated", UNSET) + + status = d.pop("status", UNSET) + + state_action_workflow_state = cls( + id=id, + outputs=outputs, + populated=populated, + status=status, + ) + + state_action_workflow_state.additional_properties = d + return state_action_workflow_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_action_workflow_state_outputs.py b/nuon/models/state_action_workflow_state_outputs.py new file mode 100644 index 00000000..53434965 --- /dev/null +++ b/nuon/models/state_action_workflow_state_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StateActionWorkflowStateOutputs") + + +@_attrs_define +class StateActionWorkflowStateOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state_action_workflow_state_outputs = cls() + + state_action_workflow_state_outputs.additional_properties = d + return state_action_workflow_state_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_actions_state.py b/nuon/models/state_actions_state.py new file mode 100644 index 00000000..27c408da --- /dev/null +++ b/nuon/models/state_actions_state.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_actions_state_workflows import StateActionsStateWorkflows + + +T = TypeVar("T", bound="StateActionsState") + + +@_attrs_define +class StateActionsState: + """ + Attributes: + populated (Union[Unset, bool]): + workflows (Union[Unset, StateActionsStateWorkflows]): + """ + + populated: Union[Unset, bool] = UNSET + workflows: Union[Unset, "StateActionsStateWorkflows"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + populated = self.populated + + workflows: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.workflows, Unset): + workflows = self.workflows.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if populated is not UNSET: + field_dict["populated"] = populated + if workflows is not UNSET: + field_dict["workflows"] = workflows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_actions_state_workflows import StateActionsStateWorkflows + + d = dict(src_dict) + populated = d.pop("populated", UNSET) + + _workflows = d.pop("workflows", UNSET) + workflows: Union[Unset, StateActionsStateWorkflows] + if isinstance(_workflows, Unset): + workflows = UNSET + else: + workflows = StateActionsStateWorkflows.from_dict(_workflows) + + state_actions_state = cls( + populated=populated, + workflows=workflows, + ) + + state_actions_state.additional_properties = d + return state_actions_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_actions_state_workflows.py b/nuon/models/state_actions_state_workflows.py new file mode 100644 index 00000000..726f05be --- /dev/null +++ b/nuon/models/state_actions_state_workflows.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.state_action_workflow_state import StateActionWorkflowState + + +T = TypeVar("T", bound="StateActionsStateWorkflows") + + +@_attrs_define +class StateActionsStateWorkflows: + """ """ + + additional_properties: dict[str, "StateActionWorkflowState"] = _attrs_field(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(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_action_workflow_state import StateActionWorkflowState + + d = dict(src_dict) + state_actions_state_workflows = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = StateActionWorkflowState.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + state_actions_state_workflows.additional_properties = additional_properties + return state_actions_state_workflows + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "StateActionWorkflowState": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "StateActionWorkflowState") -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_app_state.py b/nuon/models/state_app_state.py new file mode 100644 index 00000000..bffafb49 --- /dev/null +++ b/nuon/models/state_app_state.py @@ -0,0 +1,108 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_app_state_variables import StateAppStateVariables + + +T = TypeVar("T", bound="StateAppState") + + +@_attrs_define +class StateAppState: + """ + Attributes: + id (Union[Unset, str]): + name (Union[Unset, str]): + populated (Union[Unset, bool]): + status (Union[Unset, str]): + variables (Union[Unset, StateAppStateVariables]): + """ + + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + populated: Union[Unset, bool] = UNSET + status: Union[Unset, str] = UNSET + variables: Union[Unset, "StateAppStateVariables"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + populated = self.populated + + status = self.status + + variables: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.variables, Unset): + variables = self.variables.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if populated is not UNSET: + field_dict["populated"] = populated + if status is not UNSET: + field_dict["status"] = status + if variables is not UNSET: + field_dict["variables"] = variables + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_app_state_variables import StateAppStateVariables + + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + populated = d.pop("populated", UNSET) + + status = d.pop("status", UNSET) + + _variables = d.pop("variables", UNSET) + variables: Union[Unset, StateAppStateVariables] + if isinstance(_variables, Unset): + variables = UNSET + else: + variables = StateAppStateVariables.from_dict(_variables) + + state_app_state = cls( + id=id, + name=name, + populated=populated, + status=status, + variables=variables, + ) + + state_app_state.additional_properties = d + return state_app_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_app_state_variables.py b/nuon/models/state_app_state_variables.py new file mode 100644 index 00000000..b82e4fb7 --- /dev/null +++ b/nuon/models/state_app_state_variables.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StateAppStateVariables") + + +@_attrs_define +class StateAppStateVariables: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state_app_state_variables = cls() + + state_app_state_variables.additional_properties = d + return state_app_state_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_aws_cloud_account.py b/nuon/models/state_aws_cloud_account.py new file mode 100644 index 00000000..a6048f0d --- /dev/null +++ b/nuon/models/state_aws_cloud_account.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StateAWSCloudAccount") + + +@_attrs_define +class StateAWSCloudAccount: + """ + Attributes: + region (Union[Unset, str]): + """ + + region: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + region = self.region + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if region is not UNSET: + field_dict["region"] = region + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + region = d.pop("region", UNSET) + + state_aws_cloud_account = cls( + region=region, + ) + + state_aws_cloud_account.additional_properties = d + return state_aws_cloud_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_azure_cloud_account.py b/nuon/models/state_azure_cloud_account.py new file mode 100644 index 00000000..85b42eb3 --- /dev/null +++ b/nuon/models/state_azure_cloud_account.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StateAzureCloudAccount") + + +@_attrs_define +class StateAzureCloudAccount: + """ + Attributes: + location (Union[Unset, str]): + """ + + location: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + location = self.location + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if location is not UNSET: + field_dict["location"] = location + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + location = d.pop("location", UNSET) + + state_azure_cloud_account = cls( + location=location, + ) + + state_azure_cloud_account.additional_properties = d + return state_azure_cloud_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_cloud_account.py b/nuon/models/state_cloud_account.py new file mode 100644 index 00000000..515d872f --- /dev/null +++ b/nuon/models/state_cloud_account.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_aws_cloud_account import StateAWSCloudAccount + from ..models.state_azure_cloud_account import StateAzureCloudAccount + + +T = TypeVar("T", bound="StateCloudAccount") + + +@_attrs_define +class StateCloudAccount: + """ + Attributes: + aws (Union[Unset, StateAWSCloudAccount]): + azure (Union[Unset, StateAzureCloudAccount]): + """ + + aws: Union[Unset, "StateAWSCloudAccount"] = UNSET + azure: Union[Unset, "StateAzureCloudAccount"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws, Unset): + aws = self.aws.to_dict() + + azure: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure, Unset): + azure = self.azure.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws is not UNSET: + field_dict["aws"] = aws + if azure is not UNSET: + field_dict["azure"] = azure + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_aws_cloud_account import StateAWSCloudAccount + from ..models.state_azure_cloud_account import StateAzureCloudAccount + + d = dict(src_dict) + _aws = d.pop("aws", UNSET) + aws: Union[Unset, StateAWSCloudAccount] + if isinstance(_aws, Unset): + aws = UNSET + else: + aws = StateAWSCloudAccount.from_dict(_aws) + + _azure = d.pop("azure", UNSET) + azure: Union[Unset, StateAzureCloudAccount] + if isinstance(_azure, Unset): + azure = UNSET + else: + azure = StateAzureCloudAccount.from_dict(_azure) + + state_cloud_account = cls( + aws=aws, + azure=azure, + ) + + state_cloud_account.additional_properties = d + return state_cloud_account + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_domain_state.py b/nuon/models/state_domain_state.py new file mode 100644 index 00000000..2385b1d9 --- /dev/null +++ b/nuon/models/state_domain_state.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StateDomainState") + + +@_attrs_define +class StateDomainState: + """ + Attributes: + internal_domain (Union[Unset, str]): + populated (Union[Unset, bool]): + public_domain (Union[Unset, str]): + """ + + internal_domain: Union[Unset, str] = UNSET + populated: Union[Unset, bool] = UNSET + public_domain: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + internal_domain = self.internal_domain + + populated = self.populated + + public_domain = self.public_domain + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if internal_domain is not UNSET: + field_dict["internal_domain"] = internal_domain + if populated is not UNSET: + field_dict["populated"] = populated + if public_domain is not UNSET: + field_dict["public_domain"] = public_domain + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + internal_domain = d.pop("internal_domain", UNSET) + + populated = d.pop("populated", UNSET) + + public_domain = d.pop("public_domain", UNSET) + + state_domain_state = cls( + internal_domain=internal_domain, + populated=populated, + public_domain=public_domain, + ) + + state_domain_state.additional_properties = d + return state_domain_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_inputs_state.py b/nuon/models/state_inputs_state.py new file mode 100644 index 00000000..18cdc7a5 --- /dev/null +++ b/nuon/models/state_inputs_state.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_inputs_state_inputs import StateInputsStateInputs + + +T = TypeVar("T", bound="StateInputsState") + + +@_attrs_define +class StateInputsState: + """ + Attributes: + inputs (Union[Unset, StateInputsStateInputs]): + populated (Union[Unset, bool]): + """ + + inputs: Union[Unset, "StateInputsStateInputs"] = UNSET + populated: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + inputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.inputs, Unset): + inputs = self.inputs.to_dict() + + populated = self.populated + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if inputs is not UNSET: + field_dict["inputs"] = inputs + if populated is not UNSET: + field_dict["populated"] = populated + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_inputs_state_inputs import StateInputsStateInputs + + d = dict(src_dict) + _inputs = d.pop("inputs", UNSET) + inputs: Union[Unset, StateInputsStateInputs] + if isinstance(_inputs, Unset): + inputs = UNSET + else: + inputs = StateInputsStateInputs.from_dict(_inputs) + + populated = d.pop("populated", UNSET) + + state_inputs_state = cls( + inputs=inputs, + populated=populated, + ) + + state_inputs_state.additional_properties = d + return state_inputs_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_inputs_state_inputs.py b/nuon/models/state_inputs_state_inputs.py new file mode 100644 index 00000000..902962d7 --- /dev/null +++ b/nuon/models/state_inputs_state_inputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StateInputsStateInputs") + + +@_attrs_define +class StateInputsStateInputs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state_inputs_state_inputs = cls() + + state_inputs_state_inputs.additional_properties = d + return state_inputs_state_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_install_stack_state.py b/nuon/models/state_install_stack_state.py new file mode 100644 index 00000000..64965cdc --- /dev/null +++ b/nuon/models/state_install_stack_state.py @@ -0,0 +1,126 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_install_stack_state_outputs import StateInstallStackStateOutputs + + +T = TypeVar("T", bound="StateInstallStackState") + + +@_attrs_define +class StateInstallStackState: + """ + Attributes: + checksum (Union[Unset, str]): + outputs (Union[Unset, StateInstallStackStateOutputs]): + populated (Union[Unset, bool]): + quick_link_url (Union[Unset, str]): + status (Union[Unset, str]): + template_json (Union[Unset, str]): + template_url (Union[Unset, str]): + """ + + checksum: Union[Unset, str] = UNSET + outputs: Union[Unset, "StateInstallStackStateOutputs"] = UNSET + populated: Union[Unset, bool] = UNSET + quick_link_url: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + template_json: Union[Unset, str] = UNSET + template_url: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + checksum = self.checksum + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + populated = self.populated + + quick_link_url = self.quick_link_url + + status = self.status + + template_json = self.template_json + + template_url = self.template_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if checksum is not UNSET: + field_dict["checksum"] = checksum + if outputs is not UNSET: + field_dict["outputs"] = outputs + if populated is not UNSET: + field_dict["populated"] = populated + if quick_link_url is not UNSET: + field_dict["quick_link_url"] = quick_link_url + if status is not UNSET: + field_dict["status"] = status + if template_json is not UNSET: + field_dict["template_json"] = template_json + if template_url is not UNSET: + field_dict["template_url"] = template_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_install_stack_state_outputs import StateInstallStackStateOutputs + + d = dict(src_dict) + checksum = d.pop("checksum", UNSET) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, StateInstallStackStateOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = StateInstallStackStateOutputs.from_dict(_outputs) + + populated = d.pop("populated", UNSET) + + quick_link_url = d.pop("quick_link_url", UNSET) + + status = d.pop("status", UNSET) + + template_json = d.pop("template_json", UNSET) + + template_url = d.pop("template_url", UNSET) + + state_install_stack_state = cls( + checksum=checksum, + outputs=outputs, + populated=populated, + quick_link_url=quick_link_url, + status=status, + template_json=template_json, + template_url=template_url, + ) + + state_install_stack_state.additional_properties = d + return state_install_stack_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_install_stack_state_outputs.py b/nuon/models/state_install_stack_state_outputs.py new file mode 100644 index 00000000..be21cf31 --- /dev/null +++ b/nuon/models/state_install_stack_state_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StateInstallStackStateOutputs") + + +@_attrs_define +class StateInstallStackStateOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state_install_stack_state_outputs = cls() + + state_install_stack_state_outputs.additional_properties = d + return state_install_stack_state_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_install_state.py b/nuon/models/state_install_state.py new file mode 100644 index 00000000..ef0a2974 --- /dev/null +++ b/nuon/models/state_install_state.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_install_state_inputs import StateInstallStateInputs + from ..models.state_sandbox_state import StateSandboxState + + +T = TypeVar("T", bound="StateInstallState") + + +@_attrs_define +class StateInstallState: + """ + Attributes: + id (Union[Unset, str]): + inputs (Union[Unset, StateInstallStateInputs]): + internal_domain (Union[Unset, str]): + name (Union[Unset, str]): + populated (Union[Unset, bool]): + public_domain (Union[Unset, str]): + sandbox (Union[Unset, StateSandboxState]): + """ + + id: Union[Unset, str] = UNSET + inputs: Union[Unset, "StateInstallStateInputs"] = UNSET + internal_domain: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + populated: Union[Unset, bool] = UNSET + public_domain: Union[Unset, str] = UNSET + sandbox: Union[Unset, "StateSandboxState"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + inputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.inputs, Unset): + inputs = self.inputs.to_dict() + + internal_domain = self.internal_domain + + name = self.name + + populated = self.populated + + public_domain = self.public_domain + + sandbox: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox, Unset): + sandbox = self.sandbox.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if inputs is not UNSET: + field_dict["inputs"] = inputs + if internal_domain is not UNSET: + field_dict["internal_domain"] = internal_domain + if name is not UNSET: + field_dict["name"] = name + if populated is not UNSET: + field_dict["populated"] = populated + if public_domain is not UNSET: + field_dict["public_domain"] = public_domain + if sandbox is not UNSET: + field_dict["sandbox"] = sandbox + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_install_state_inputs import StateInstallStateInputs + from ..models.state_sandbox_state import StateSandboxState + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _inputs = d.pop("inputs", UNSET) + inputs: Union[Unset, StateInstallStateInputs] + if isinstance(_inputs, Unset): + inputs = UNSET + else: + inputs = StateInstallStateInputs.from_dict(_inputs) + + internal_domain = d.pop("internal_domain", UNSET) + + name = d.pop("name", UNSET) + + populated = d.pop("populated", UNSET) + + public_domain = d.pop("public_domain", UNSET) + + _sandbox = d.pop("sandbox", UNSET) + sandbox: Union[Unset, StateSandboxState] + if isinstance(_sandbox, Unset): + sandbox = UNSET + else: + sandbox = StateSandboxState.from_dict(_sandbox) + + state_install_state = cls( + id=id, + inputs=inputs, + internal_domain=internal_domain, + name=name, + populated=populated, + public_domain=public_domain, + sandbox=sandbox, + ) + + state_install_state.additional_properties = d + return state_install_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_install_state_inputs.py b/nuon/models/state_install_state_inputs.py new file mode 100644 index 00000000..8f164644 --- /dev/null +++ b/nuon/models/state_install_state_inputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StateInstallStateInputs") + + +@_attrs_define +class StateInstallStateInputs: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state_install_state_inputs = cls() + + state_install_state_inputs.additional_properties = d + return state_install_state_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_org_state.py b/nuon/models/state_org_state.py new file mode 100644 index 00000000..0bd0eb7e --- /dev/null +++ b/nuon/models/state_org_state.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StateOrgState") + + +@_attrs_define +class StateOrgState: + """ + Attributes: + id (Union[Unset, str]): + name (Union[Unset, str]): + populated (Union[Unset, bool]): + status (Union[Unset, str]): + """ + + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + populated: Union[Unset, bool] = UNSET + status: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + populated = self.populated + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if populated is not UNSET: + field_dict["populated"] = populated + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + populated = d.pop("populated", UNSET) + + status = d.pop("status", UNSET) + + state_org_state = cls( + id=id, + name=name, + populated=populated, + status=status, + ) + + state_org_state.additional_properties = d + return state_org_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_runner_state.py b/nuon/models/state_runner_state.py new file mode 100644 index 00000000..5fd73a8b --- /dev/null +++ b/nuon/models/state_runner_state.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StateRunnerState") + + +@_attrs_define +class StateRunnerState: + """ + Attributes: + id (Union[Unset, str]): + populated (Union[Unset, bool]): + runner_group_id (Union[Unset, str]): + status (Union[Unset, str]): + """ + + id: Union[Unset, str] = UNSET + populated: Union[Unset, bool] = UNSET + runner_group_id: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + populated = self.populated + + runner_group_id = self.runner_group_id + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if populated is not UNSET: + field_dict["populated"] = populated + if runner_group_id is not UNSET: + field_dict["runner_group_id"] = runner_group_id + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + populated = d.pop("populated", UNSET) + + runner_group_id = d.pop("runner_group_id", UNSET) + + status = d.pop("status", UNSET) + + state_runner_state = cls( + id=id, + populated=populated, + runner_group_id=runner_group_id, + status=status, + ) + + state_runner_state.additional_properties = d + return state_runner_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_sandbox_state.py b/nuon/models/state_sandbox_state.py new file mode 100644 index 00000000..d578415d --- /dev/null +++ b/nuon/models/state_sandbox_state.py @@ -0,0 +1,127 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.state_sandbox_state_outputs import StateSandboxStateOutputs + + +T = TypeVar("T", bound="StateSandboxState") + + +@_attrs_define +class StateSandboxState: + """ + Attributes: + outputs (Union[Unset, StateSandboxStateOutputs]): + populated (Union[Unset, bool]): + recent_runs (Union[Unset, list['StateSandboxState']]): + status (Union[Unset, str]): + type_ (Union[Unset, str]): + version (Union[Unset, str]): + """ + + outputs: Union[Unset, "StateSandboxStateOutputs"] = UNSET + populated: Union[Unset, bool] = UNSET + recent_runs: Union[Unset, list["StateSandboxState"]] = UNSET + status: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + populated = self.populated + + recent_runs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.recent_runs, Unset): + recent_runs = [] + for recent_runs_item_data in self.recent_runs: + recent_runs_item = recent_runs_item_data.to_dict() + recent_runs.append(recent_runs_item) + + status = self.status + + type_ = self.type_ + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if outputs is not UNSET: + field_dict["outputs"] = outputs + if populated is not UNSET: + field_dict["populated"] = populated + if recent_runs is not UNSET: + field_dict["recent_runs"] = recent_runs + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.state_sandbox_state_outputs import StateSandboxStateOutputs + + d = dict(src_dict) + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, StateSandboxStateOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = StateSandboxStateOutputs.from_dict(_outputs) + + populated = d.pop("populated", UNSET) + + recent_runs = [] + _recent_runs = d.pop("recent_runs", UNSET) + for recent_runs_item_data in _recent_runs or []: + recent_runs_item = StateSandboxState.from_dict(recent_runs_item_data) + + recent_runs.append(recent_runs_item) + + status = d.pop("status", UNSET) + + type_ = d.pop("type", UNSET) + + version = d.pop("version", UNSET) + + state_sandbox_state = cls( + outputs=outputs, + populated=populated, + recent_runs=recent_runs, + status=status, + type_=type_, + version=version, + ) + + state_sandbox_state.additional_properties = d + return state_sandbox_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_sandbox_state_outputs.py b/nuon/models/state_sandbox_state_outputs.py new file mode 100644 index 00000000..67290aa4 --- /dev/null +++ b/nuon/models/state_sandbox_state_outputs.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StateSandboxStateOutputs") + + +@_attrs_define +class StateSandboxStateOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state_sandbox_state_outputs = cls() + + state_sandbox_state_outputs.additional_properties = d + return state_sandbox_state_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/state_secrets_state.py b/nuon/models/state_secrets_state.py new file mode 100644 index 00000000..1e49f1ae --- /dev/null +++ b/nuon/models/state_secrets_state.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.outputs_secret_sync_output import OutputsSecretSyncOutput + + +T = TypeVar("T", bound="StateSecretsState") + + +@_attrs_define +class StateSecretsState: + """ """ + + additional_properties: dict[str, "OutputsSecretSyncOutput"] = _attrs_field(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(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.outputs_secret_sync_output import OutputsSecretSyncOutput + + d = dict(src_dict) + state_secrets_state = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = OutputsSecretSyncOutput.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + state_secrets_state.additional_properties = additional_properties + return state_secrets_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "OutputsSecretSyncOutput": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "OutputsSecretSyncOutput") -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/nuon/models/stderr_err_response.py b/nuon/models/stderr_err_response.py new file mode 100644 index 00000000..ed2992a3 --- /dev/null +++ b/nuon/models/stderr_err_response.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StderrErrResponse") + + +@_attrs_define +class StderrErrResponse: + """ + Attributes: + description (Union[Unset, str]): + error (Union[Unset, str]): + user_error (Union[Unset, bool]): + """ + + description: Union[Unset, str] = UNSET + error: Union[Unset, str] = UNSET + user_error: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + description = self.description + + error = self.error + + user_error = self.user_error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if description is not UNSET: + field_dict["description"] = description + if error is not UNSET: + field_dict["error"] = error + if user_error is not UNSET: + field_dict["user_error"] = user_error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + description = d.pop("description", UNSET) + + error = d.pop("error", UNSET) + + user_error = d.pop("user_error", UNSET) + + stderr_err_response = cls( + description=description, + error=error, + user_error=user_error, + ) + + stderr_err_response.additional_properties = d + return stderr_err_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/nuon/models/types_string_bool_map.py b/nuon/models/types_string_bool_map.py new file mode 100644 index 00000000..1e0bb089 --- /dev/null +++ b/nuon/models/types_string_bool_map.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TypesStringBoolMap") + + +@_attrs_define +class TypesStringBoolMap: + """ """ + + additional_properties: dict[str, bool] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + types_string_bool_map = cls() + + types_string_bool_map.additional_properties = d + return types_string_bool_map + + @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/nuon/models/unlock_terraform_workspace_body.py b/nuon/models/unlock_terraform_workspace_body.py new file mode 100644 index 00000000..25b7cae7 --- /dev/null +++ b/nuon/models/unlock_terraform_workspace_body.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UnlockTerraformWorkspaceBody") + + +@_attrs_define +class UnlockTerraformWorkspaceBody: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + unlock_terraform_workspace_body = cls() + + unlock_terraform_workspace_body.additional_properties = d + return unlock_terraform_workspace_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/nuon/models/update_terraform_state_body.py b/nuon/models/update_terraform_state_body.py new file mode 100644 index 00000000..64673d44 --- /dev/null +++ b/nuon/models/update_terraform_state_body.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateTerraformStateBody") + + +@_attrs_define +class UpdateTerraformStateBody: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_terraform_state_body = cls() + + update_terraform_state_body.additional_properties = d + return update_terraform_state_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/nuon/py.typed b/nuon/py.typed new file mode 100644 index 00000000..1aad3271 --- /dev/null +++ b/nuon/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 \ No newline at end of file diff --git a/nuon/types.py b/nuon/types.py new file mode 100644 index 00000000..1b96ca40 --- /dev/null +++ b/nuon/types.py @@ -0,0 +1,54 @@ +"""Contains some shared types for properties""" + +from collections.abc import Mapping, MutableMapping +from http import HTTPStatus +from typing import IO, BinaryIO, Generic, Literal, Optional, TypeVar, Union + +from attrs import define + + +class Unset: + def __bool__(self) -> Literal[False]: + return False + + +UNSET: Unset = Unset() + +# The types that `httpx.Client(files=)` can accept, copied from that library. +FileContent = Union[IO[bytes], bytes, str] +FileTypes = Union[ + # (filename, file (or bytes), content_type) + tuple[Optional[str], FileContent, Optional[str]], + # (filename, file (or bytes), content_type, headers) + tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], +] +RequestFiles = list[tuple[str, FileTypes]] + + +@define +class File: + """Contains information for file uploads""" + + payload: BinaryIO + file_name: Optional[str] = None + mime_type: Optional[str] = None + + def to_tuple(self) -> FileTypes: + """Return a tuple representation that httpx will accept for multipart/form-data""" + return self.file_name, self.payload, self.mime_type + + +T = TypeVar("T") + + +@define +class Response(Generic[T]): + """A response from an endpoint""" + + status_code: HTTPStatus + content: bytes + headers: MutableMapping[str, str] + parsed: Optional[T] + + +__all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] diff --git a/pyproject.toml b/pyproject.toml index a77ff287..5fbc5b46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.619" +version = "0.19.679" description = "A client library for accessing Nuon" authors = [] requires-python = "~=3.9" diff --git a/uv.lock b/uv.lock index af9f38f6..b07f0eed 100644 --- a/uv.lock +++ b/uv.lock @@ -35,6 +35,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5", size = 161216, upload-time = "2025-08-03T03:07:45.777Z" }, ] +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + [[package]] name = "exceptiongroup" version = "1.3.0" @@ -93,9 +102,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" }, ] +[[package]] +name = "iniconfig" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" }, +] + [[package]] name = "nuon" -version = "0.19.620" +version = "0.19.668" source = { editable = "." } dependencies = [ { name = "attrs" }, @@ -103,6 +121,12 @@ dependencies = [ { name = "python-dateutil" }, ] +[package.dev-dependencies] +dev = [ + { name = "pytest" }, + { name = "pyyaml" }, +] + [package.metadata] requires-dist = [ { name = "attrs", specifier = ">=22.2.0" }, @@ -110,6 +134,57 @@ requires-dist = [ { name = "python-dateutil", specifier = ">=2.8.0,<3" }, ] +[package.metadata.requires-dev] +dev = [ + { name = "pytest", specifier = ">=8.4.2" }, + { name = "pyyaml", specifier = ">=6.0.3" }, +] + +[[package]] +name = "packaging" +version = "25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pytest" +version = "8.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -122,6 +197,79 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, ] +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, + { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, + { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, + { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, + { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, + { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, + { url = "https://files.pythonhosted.org/packages/9f/62/67fc8e68a75f738c9200422bf65693fb79a4cd0dc5b23310e5202e978090/pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da", size = 184450, upload-time = "2025-09-25T21:33:00.618Z" }, + { url = "https://files.pythonhosted.org/packages/ae/92/861f152ce87c452b11b9d0977952259aa7df792d71c1053365cc7b09cc08/pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917", size = 174319, upload-time = "2025-09-25T21:33:02.086Z" }, + { url = "https://files.pythonhosted.org/packages/d0/cd/f0cfc8c74f8a030017a2b9c771b7f47e5dd702c3e28e5b2071374bda2948/pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9", size = 737631, upload-time = "2025-09-25T21:33:03.25Z" }, + { url = "https://files.pythonhosted.org/packages/ef/b2/18f2bd28cd2055a79a46c9b0895c0b3d987ce40ee471cecf58a1a0199805/pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5", size = 836795, upload-time = "2025-09-25T21:33:05.014Z" }, + { url = "https://files.pythonhosted.org/packages/73/b9/793686b2d54b531203c160ef12bec60228a0109c79bae6c1277961026770/pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a", size = 750767, upload-time = "2025-09-25T21:33:06.398Z" }, + { url = "https://files.pythonhosted.org/packages/a9/86/a137b39a611def2ed78b0e66ce2fe13ee701a07c07aebe55c340ed2a050e/pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926", size = 727982, upload-time = "2025-09-25T21:33:08.708Z" }, + { url = "https://files.pythonhosted.org/packages/dd/62/71c27c94f457cf4418ef8ccc71735324c549f7e3ea9d34aba50874563561/pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7", size = 755677, upload-time = "2025-09-25T21:33:09.876Z" }, + { url = "https://files.pythonhosted.org/packages/29/3d/6f5e0d58bd924fb0d06c3a6bad00effbdae2de5adb5cda5648006ffbd8d3/pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0", size = 142592, upload-time = "2025-09-25T21:33:10.983Z" }, + { url = "https://files.pythonhosted.org/packages/f0/0c/25113e0b5e103d7f1490c0e947e303fe4a696c10b501dea7a9f49d4e876c/pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007", size = 158777, upload-time = "2025-09-25T21:33:15.55Z" }, +] + [[package]] name = "six" version = "1.17.0" @@ -140,6 +288,55 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" }, ] +[[package]] +name = "tomli" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549", size = 17392, upload-time = "2025-10-08T22:01:47.119Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/2e/299f62b401438d5fe1624119c723f5d877acc86a4c2492da405626665f12/tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45", size = 153236, upload-time = "2025-10-08T22:01:00.137Z" }, + { url = "https://files.pythonhosted.org/packages/86/7f/d8fffe6a7aefdb61bced88fcb5e280cfd71e08939da5894161bd71bea022/tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba", size = 148084, upload-time = "2025-10-08T22:01:01.63Z" }, + { url = "https://files.pythonhosted.org/packages/47/5c/24935fb6a2ee63e86d80e4d3b58b222dafaf438c416752c8b58537c8b89a/tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf", size = 234832, upload-time = "2025-10-08T22:01:02.543Z" }, + { url = "https://files.pythonhosted.org/packages/89/da/75dfd804fc11e6612846758a23f13271b76d577e299592b4371a4ca4cd09/tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441", size = 242052, upload-time = "2025-10-08T22:01:03.836Z" }, + { url = "https://files.pythonhosted.org/packages/70/8c/f48ac899f7b3ca7eb13af73bacbc93aec37f9c954df3c08ad96991c8c373/tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845", size = 239555, upload-time = "2025-10-08T22:01:04.834Z" }, + { url = "https://files.pythonhosted.org/packages/ba/28/72f8afd73f1d0e7829bfc093f4cb98ce0a40ffc0cc997009ee1ed94ba705/tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c", size = 245128, upload-time = "2025-10-08T22:01:05.84Z" }, + { url = "https://files.pythonhosted.org/packages/b6/eb/a7679c8ac85208706d27436e8d421dfa39d4c914dcf5fa8083a9305f58d9/tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456", size = 96445, upload-time = "2025-10-08T22:01:06.896Z" }, + { url = "https://files.pythonhosted.org/packages/0a/fe/3d3420c4cb1ad9cb462fb52967080575f15898da97e21cb6f1361d505383/tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be", size = 107165, upload-time = "2025-10-08T22:01:08.107Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b7/40f36368fcabc518bb11c8f06379a0fd631985046c038aca08c6d6a43c6e/tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac", size = 154891, upload-time = "2025-10-08T22:01:09.082Z" }, + { url = "https://files.pythonhosted.org/packages/f9/3f/d9dd692199e3b3aab2e4e4dd948abd0f790d9ded8cd10cbaae276a898434/tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22", size = 148796, upload-time = "2025-10-08T22:01:10.266Z" }, + { url = "https://files.pythonhosted.org/packages/60/83/59bff4996c2cf9f9387a0f5a3394629c7efa5ef16142076a23a90f1955fa/tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f", size = 242121, upload-time = "2025-10-08T22:01:11.332Z" }, + { url = "https://files.pythonhosted.org/packages/45/e5/7c5119ff39de8693d6baab6c0b6dcb556d192c165596e9fc231ea1052041/tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52", size = 250070, upload-time = "2025-10-08T22:01:12.498Z" }, + { url = "https://files.pythonhosted.org/packages/45/12/ad5126d3a278f27e6701abde51d342aa78d06e27ce2bb596a01f7709a5a2/tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8", size = 245859, upload-time = "2025-10-08T22:01:13.551Z" }, + { url = "https://files.pythonhosted.org/packages/fb/a1/4d6865da6a71c603cfe6ad0e6556c73c76548557a8d658f9e3b142df245f/tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6", size = 250296, upload-time = "2025-10-08T22:01:14.614Z" }, + { url = "https://files.pythonhosted.org/packages/a0/b7/a7a7042715d55c9ba6e8b196d65d2cb662578b4d8cd17d882d45322b0d78/tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876", size = 97124, upload-time = "2025-10-08T22:01:15.629Z" }, + { url = "https://files.pythonhosted.org/packages/06/1e/f22f100db15a68b520664eb3328fb0ae4e90530887928558112c8d1f4515/tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878", size = 107698, upload-time = "2025-10-08T22:01:16.51Z" }, + { url = "https://files.pythonhosted.org/packages/89/48/06ee6eabe4fdd9ecd48bf488f4ac783844fd777f547b8d1b61c11939974e/tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b", size = 154819, upload-time = "2025-10-08T22:01:17.964Z" }, + { url = "https://files.pythonhosted.org/packages/f1/01/88793757d54d8937015c75dcdfb673c65471945f6be98e6a0410fba167ed/tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae", size = 148766, upload-time = "2025-10-08T22:01:18.959Z" }, + { url = "https://files.pythonhosted.org/packages/42/17/5e2c956f0144b812e7e107f94f1cc54af734eb17b5191c0bbfb72de5e93e/tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b", size = 240771, upload-time = "2025-10-08T22:01:20.106Z" }, + { url = "https://files.pythonhosted.org/packages/d5/f4/0fbd014909748706c01d16824eadb0307115f9562a15cbb012cd9b3512c5/tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf", size = 248586, upload-time = "2025-10-08T22:01:21.164Z" }, + { url = "https://files.pythonhosted.org/packages/30/77/fed85e114bde5e81ecf9bc5da0cc69f2914b38f4708c80ae67d0c10180c5/tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f", size = 244792, upload-time = "2025-10-08T22:01:22.417Z" }, + { url = "https://files.pythonhosted.org/packages/55/92/afed3d497f7c186dc71e6ee6d4fcb0acfa5f7d0a1a2878f8beae379ae0cc/tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05", size = 248909, upload-time = "2025-10-08T22:01:23.859Z" }, + { url = "https://files.pythonhosted.org/packages/f8/84/ef50c51b5a9472e7265ce1ffc7f24cd4023d289e109f669bdb1553f6a7c2/tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606", size = 96946, upload-time = "2025-10-08T22:01:24.893Z" }, + { url = "https://files.pythonhosted.org/packages/b2/b7/718cd1da0884f281f95ccfa3a6cc572d30053cba64603f79d431d3c9b61b/tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999", size = 107705, upload-time = "2025-10-08T22:01:26.153Z" }, + { url = "https://files.pythonhosted.org/packages/19/94/aeafa14a52e16163008060506fcb6aa1949d13548d13752171a755c65611/tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e", size = 154244, upload-time = "2025-10-08T22:01:27.06Z" }, + { url = "https://files.pythonhosted.org/packages/db/e4/1e58409aa78eefa47ccd19779fc6f36787edbe7d4cd330eeeedb33a4515b/tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3", size = 148637, upload-time = "2025-10-08T22:01:28.059Z" }, + { url = "https://files.pythonhosted.org/packages/26/b6/d1eccb62f665e44359226811064596dd6a366ea1f985839c566cd61525ae/tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc", size = 241925, upload-time = "2025-10-08T22:01:29.066Z" }, + { url = "https://files.pythonhosted.org/packages/70/91/7cdab9a03e6d3d2bb11beae108da5bdc1c34bdeb06e21163482544ddcc90/tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0", size = 249045, upload-time = "2025-10-08T22:01:31.98Z" }, + { url = "https://files.pythonhosted.org/packages/15/1b/8c26874ed1f6e4f1fcfeb868db8a794cbe9f227299402db58cfcc858766c/tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879", size = 245835, upload-time = "2025-10-08T22:01:32.989Z" }, + { url = "https://files.pythonhosted.org/packages/fd/42/8e3c6a9a4b1a1360c1a2a39f0b972cef2cc9ebd56025168c4137192a9321/tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005", size = 253109, upload-time = "2025-10-08T22:01:34.052Z" }, + { url = "https://files.pythonhosted.org/packages/22/0c/b4da635000a71b5f80130937eeac12e686eefb376b8dee113b4a582bba42/tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463", size = 97930, upload-time = "2025-10-08T22:01:35.082Z" }, + { url = "https://files.pythonhosted.org/packages/b9/74/cb1abc870a418ae99cd5c9547d6bce30701a954e0e721821df483ef7223c/tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8", size = 107964, upload-time = "2025-10-08T22:01:36.057Z" }, + { url = "https://files.pythonhosted.org/packages/54/78/5c46fff6432a712af9f792944f4fcd7067d8823157949f4e40c56b8b3c83/tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77", size = 163065, upload-time = "2025-10-08T22:01:37.27Z" }, + { url = "https://files.pythonhosted.org/packages/39/67/f85d9bd23182f45eca8939cd2bc7050e1f90c41f4a2ecbbd5963a1d1c486/tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf", size = 159088, upload-time = "2025-10-08T22:01:38.235Z" }, + { url = "https://files.pythonhosted.org/packages/26/5a/4b546a0405b9cc0659b399f12b6adb750757baf04250b148d3c5059fc4eb/tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530", size = 268193, upload-time = "2025-10-08T22:01:39.712Z" }, + { url = "https://files.pythonhosted.org/packages/42/4f/2c12a72ae22cf7b59a7fe75b3465b7aba40ea9145d026ba41cb382075b0e/tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b", size = 275488, upload-time = "2025-10-08T22:01:40.773Z" }, + { url = "https://files.pythonhosted.org/packages/92/04/a038d65dbe160c3aa5a624e93ad98111090f6804027d474ba9c37c8ae186/tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67", size = 272669, upload-time = "2025-10-08T22:01:41.824Z" }, + { url = "https://files.pythonhosted.org/packages/be/2f/8b7c60a9d1612a7cbc39ffcca4f21a73bf368a80fc25bccf8253e2563267/tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f", size = 279709, upload-time = "2025-10-08T22:01:43.177Z" }, + { url = "https://files.pythonhosted.org/packages/7e/46/cc36c679f09f27ded940281c38607716c86cf8ba4a518d524e349c8b4874/tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0", size = 107563, upload-time = "2025-10-08T22:01:44.233Z" }, + { url = "https://files.pythonhosted.org/packages/84/ff/426ca8683cf7b753614480484f6437f568fd2fda2edbdf57a2d3d8b27a0b/tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba", size = 119756, upload-time = "2025-10-08T22:01:45.234Z" }, + { url = "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b", size = 14408, upload-time = "2025-10-08T22:01:46.04Z" }, +] + [[package]] name = "typing-extensions" version = "4.14.1" diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..848ef50c --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.19.679 From 003bfbef1595644fbb40facc8e7566d6bec1d104 Mon Sep 17 00:00:00 2001 From: fidiego Date: Mon, 27 Oct 2025 17:12:25 -0500 Subject: [PATCH 4/4] chore: better generate script default --- scripts/generate.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index f626dd1f..a0bcef7e 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -4,13 +4,15 @@ set -e set -o pipefail set -u -ENV="{$1:-prod}" +ENV=${1:-prod} HOST="https://api.nuon.co" if [ "$ENV" == "dev" ]; then + echo "ENV: $ENV" HOST="http://localhost:8081" elif [ "$ENV" == "stage" ]; then + echo "ENV: $ENV" HOST="https://api.stage.nuon.co" fi @@ -20,10 +22,13 @@ config=`pwd`"/gen.yaml" echo echo "preparing to generate SDK" echo "> host: $HOST" +echo "> env: $ENV" echo "> config: $config" +echo echo "> installing dependencies" pipx install openapi-python-client --include-deps +echo echo "> spec: $SPEC" @@ -34,6 +39,7 @@ openapi-python-client generate \ --output-path . \ --overwrite \ --meta uv +echo # save version to file for workflows to read from cat pyproject.toml | grep version | sed -e 's/.*version = "\(.*\)"/\1/' > version.txt